Rochdale should have led in the 31st minute of Tuesday's League Two encounter at the New York Stadium when goalkeeper Scott Shearer misjudged a long through ball and appeared to handle outside his area. The referee played the advantage and Bobby Grant and Andrew Tutte had shots blocked on the line before Rotherham scrambled the ball clear.
Shearer was booked by referee Stephen Martin, and was fortunate not to see red, and six minutes later he made up for his blunder with a great save.
But in added time Kayode Odejayi gave the ball away deep in his own half and George Donnelly squared the ball for the veteran Dele Adebola to fire into the empty net.
Rotherham levelled after 60 minutes when Ben Pringle's cross from the left was met with a bullet header by Revell, and five minutes later the Millers took the lead, substitute Daniel Nardiello nodding home from close range.
But in 73 minutes Jason Kennedy's penalty area dive fooled referee Martin and Bobby Grant equalised from the resultant spot-kick and this incredible game took yet another turn in the 80th minute when Kevin McIntyre fired home from 25 yards.