The draw had looked the most likely result in a scrappy contest, with chances at a premium for both sides.
However with 75 minutes gone, Scott Doe was hesitant in defence when O'Grady ran at him and the former Oldham striker duly slotted it through his legs and into the net from 12 yards.
"It was a super finish and Chris is a superb player," said Dale boss Keith Hill. "He's a great target man, but he's a goal-scoring target man. His mobility is superb.
"People once told me that Chris O'Grady couldn't score goals, but we've turned him into a goalscorer and he's helped in that.
"He's sought after from clubs in and around the Championship, but there's no way we'll be stupid enough to sell somebody who is an asset to this team."