Posh withstood a second-half fightback from Rovers to climb off the bottom of the Championship table. They are now 22nd, a point behind fourth-bottom Barnsley, while a fifth league game without victory leaves Blackburn 10 points shy of the top six with their play-off hopes in tatters.
Posh should gone ahead in the third minute when Lee Tomlin and Gayle combined to present Danny Swanson with a glorious opportunity that he blazed over.
As usual, Rovers’ main attacking threat came from Jordan Rhodes, who had a shot blocked by Gabriel Zakuani and headed over from David Bentley’s measured cross before Peterborough took an 11th-minute lead.
Jake Kean produced a fine double save to thwart Swanson but Gayle was on hand to blast into the roof of the net.
Michael Appleton’s men almost found an instant response but Posh goalkeeper Robert Olejnik bravely denied DJ Campbell, and Gayle ensured he was handsomely rewarded.
Nathan Mendez-Laing comprehensively beat Rovers defender Scott Dann before his cross to the far post was misjudged by Karim Rekik, the on-loan Manchester City youngster getting underneath the ball and allowing Gayle to head home back across Kean.
A porous midfield was at the root of Blackburn’s problem and Appleton brought Bentley inside into an advanced central role, deploying Campbell on the right flank. Moments after the reshuffle, however, it was 3-0.
Once again Mendez-Laing was the catalyst as he danced through a home defence offering generous helpings of time and space. He cut back for Tomlin to shoot and Kean produced another save in vain, Gayle coolly lifting the rebound over him to claim the matchball.
Rhodes uncharacteristically spurned an opportunity to hand Blackburn a lifeline, blazing from 12 yards after Olejnik kept out a Dann header, but it was almost 4-0 at the interval as Swanson drove inches wide from distance with Kean beaten.
In the second half, Blackburn enjoyed longer periods of possession but clear-cut chances were not forthcoming, while Rekik produced a magnificent last-ditch tackle to deny Mendez-Laing on the counter attack.
With 17 minutes to play, Rhodes reduced the arrears in assured fashion – steeling in behind the Peterborough defence and nutmegging Michael Bostwick to earn the space for a crisp finish.
Jason Lowe had the chance to set up a grandstand finish with his first senior goal but the Rovers midfielder flashed his snapshot wide.
New loan signing David Jones belatedly did just that in the second minute of stoppage time, capping a fine individual display by curling beyond Olejnik from 20 yards, but too much damage had been done.