The 60-year-old was one of five people killed when a helicopter they were travelling in appeared to lose control shortly after taking off from the King Power Stadium after last Sunday's (NZDT) 1-1 draw with West Ham.
After impeccably observed pre-match tributes, both sides contributed to a fiery and frenetic first-half, which saw the crossbar struck at both ends.
The game's decisive moment came after 55 minutes when Gray turned home from 10 yards after a fine cross from Ben Chilwell, sparking an outpouring of emotion from the Foxes' players and travelling support after a tragic week.
Leicester – which lost Harry Maguire to injury after 27 minutes – almost fell behind on the half-hour mark when Victor Camarasa's 25-yard free-kick cannoned back off Kasper Schmeichel's crossbar.
Wilfred Ndidi – who scored the late equaliser in last Sunday's (AEDT) draw with West Ham – then headed wide from six yards after rising highest to meet James Maddison's inswinging corner.
Leicester was denied a blatant penalty in first-half stoppage time, referee Lee Probert failing to punish Sol Bamba after the Bluebirds defender had diverted Jamie Vardy's close-range effort onto the crossbar with his arm.
Schmeichel denied Josh Murphy from an acute angle in the opening stages of the second period before Gray's second league goal of the season broke the deadlock in the 55th minute.
Chilwell picked out the winger with a superb cross from the left, allowing the 22-year-old to stroke past Neil Etheridge from 10 yards, although Probert booked him for removing his shirt to reveal a tribute to Srivaddhanaprabha.
Cardiff pushed hard in the closing stages, but Leicester – which might have added a second when Vardy was smartly thwarted by Etheridge – held firm to claim maximum points after a challenging and emotional week.