Shane Duffy brought down George Boyd in the box with a quarter of an hour gone and Gray stepped up to smash home what proved to be the winner from 12 yards.
It was the 24-year-old's 21st league goal of the campaign, with Leyton Orient's Jay Simpson the only man in the top four tiers of English football to have netted more.
Blackburn huffed and puffed in search of an equaliser but ultimately to no avail as they failed to score on a league visit to Turf Moor for the first time since October 1963.
Premier League
Tottenham up into fourth place with narrow win over struggling Burnley
15/05/2022 AT 10:04
Burnley's unbeaten run in the Championship now stands at 12 games but there were long stages of this encounter where they looked far from the country's in-form team.
The visitors acquitted themselves well in the game's opening stages and it took a daft challenge from Duffy to break the deadlock.
As Boyd controlled the ball with his back to the goal, the Blackburn defender clumsily stretched out a leg leaving the referee with little choice but to point to the spot as the Burnley player crumpled to the ground.
Gray smashed the resulting spot-kick straight down the middle with the confidence of a man who has now scored three times in the past two games.
Elliott Bennett almost grabbed an equaliser when he dug out a shot from the edge of the area which was athletically clawed away by Tom Heaton.
Just moments later Hope Apkan's deflected shot was also kept out by the Clarets skipper as Blackburn enjoyed their best spell of the game.
The second half followed a similar pattern as Burnley seemed content to simply contain Rovers, whose inability to turn possession into chances made frustrating viewing for both their 2,000 supporters and an increasingly animated Paul Lambert on the touchline.
When Rovers did carve out an opening Heaton was there again, tipping a deflected shot from Bennett around the post and saving comfortably from Ben Marshall.

Burnley celebrate their win over Blackburn.

Image credit: Reuters

With the energetic Gray substituted for the last quarter it was hard to see an outlet for the Clarets, who seemed happy to get 10 men behind the ball and hold on to what they had.
Lambert's final throw of the dice saw Chris Brown come on for the last 10 minutes but the former Preston man had no chances to end his 34-game goal drought.
As the game drifted towards its conclusion, Blackburn failed to break down a Burnley defence which has only conceded one goal in their last eight home games - although the Clarets will probably need to play better than this moving forward to secure promotion.
Premier League
Everton end away drought to boost survival hopes, West Ham thump Norwich
08/05/2022 AT 15:04
Premier League
Watford down after Palace loss, Burnley slump to Villa defeat
07/05/2022 AT 16:38