A late turnaround at the Crown Oil Arena saw Rovers leave Rochdale pointless despite John Marquis’ opening strike.
Marquis had turned the ball home after 73 minutes, but a dramatic period of stoppage time saw Dale draw level then go on to snatch victory.
Darren Ferguson made five changes, with James Coppinger, Andy Williams, Issam Ben Khemis, Jordan Houghton and Niall Mason coming back into the starting XI.
The home side were handed a great opportunity after eight minutes when they were awarded a penalty.
The visiting defence were surprised by the decision, and Ian Lawlor ensured it came to nothing as he saved Steven Davies’ spot-kick.
A free-kick from about 30 yards provided an opportunity for Rovers. John Marquis and Coppinger stood over the ball, and surprisingly it was the forward who took it – but fired it straight into the hands of Brendan Moore.
Ferguson made his first change with 10 minutes of the half to go, with Matty Blair coming off the bench for Ben Khemis.
Blair went close to opening the scoring with a cross from the left which clipped the top of Moore’s crossbar.
There were no further changes at the break, with MJ William’s deflected effort for the home side ensuring the visitors had the first chance of the game.
Rovers then enjoyed a good spell - though they struggled to create clear-cut chances. Coppinger produced some great crosses which no one could quite get on the end of, while Williams’ pass for Marquis was just in front of the No.9.
They did go ahead after 73 minutes from a set-piece. Coppinger’s corner found Williams, who scrambled a left-footed shot away - his effort came back off the inside of a post, but Marquis was on hand to turn it home.
Some great goalkeeping from Lawlor kept Rovers ahead in the closing stages, turning away Davies header then rushing out to block Rafferty’s shot from outside the area.
But it all changed in the three minutes of stoppage time. Mark Kitching drew Dale level with a stunning effort which nestled in the top-left corner.
Then, a minute later, Davies bundled home the ball from Joseph Bunney’s corner to complete a remarkable turnaround.