The Millers looked to be heading to their first defeat since December 2 after John Marquis put Rovers ahead just before the break but Michael Smith headed home in the early stages of 12 minutes of stoppage-time and then Joe Newell scored a penalty with the last kick of the game.
Paul Warne’s men did not start off like a team that had not lost for that period of time and they were the masters of their own downfall as Doncaster took the lead six minutes before the break.
Defender Semi Ajayi was caught dallying in possession on the edge of the area and Marquis was able to take advantage and slam home a sweet 18-yard finish.
The Millers spent much of the second half threatening an equaliserand a golden chance came when the ball fell to Richie Towell 16 yards out, but Joe Wright produced a stunning block on the line to deny a certain goal.
Their pressure eventually paid off in stoppage-time on as Smith rose highest to nod home a Newellfree-kick and they stole the unlikeliest of wins when the midfielder converted from the spot after Smith was fouled.