Preston remain second bottom of the Championship, seven points shy of safety with five matches remaining following an entertaining contest at the Keepmoat Stadium on Tuesday night.
Doncaster led through Brian Stock's 77th-minute strike, but the lead was short-lived as Hayes made an instant impact.
Both sides enjoyed a host of chances in an end-to-end affair, while Preston were furious not to be awarded a penalty when Eddie Johnson went down under James O'Connor's challenge in the second half.
The result does more favours for Sean O'Driscoll's Rovers, who halted a run of three straight defeats and sit eight points clear of the drop zone.
Doncaster defenders Mustapha Dumbuya and Joseph Mills suffered hamstring injuries in the last-gasp defeat to Cardiff and were replaced by Matt Kilgallon and O'Connor, who returned from a two-month lay-off with a broken metatarsal.
Chris Brown also came back from a spell on the sidelines to replace midfielder Adam Barton in an attacking Preston line-up.
Doncaster almost had the perfect start when Stock's perfectly-measured first-time pass found left-back George Friend in the area. Friend let fly with a rasping effort that had Preston goalkeeper Iain Turner at full-stretch to beat over the bar.
The home side made most of the early running, but their free-flowing approach left them vulnerable at the back, as evidenced in the ninth minute when Gary Woods raced from his goal line to thwart Brown after deft through-ball from strike partner Iain Hume had sent him clear.
The game developed a cat-and-mouse feel as Preston worked tirelessly to thwart clever Doncaster interplay around their own penalty area, while Hume and Keith Treacy carried a menacing threat on the counter attack.
When the pair combined in the 35th minute, North End should have gone in front.
Treacy's goalbound volley from Hume's left-wing cross was spilt by Woods to leave Johnson with a golden opportunity, but Preston's on-loan Fulham forward thumped into the side netting from point-blank range.
Doncaster resumed the ascendancy as half-time approached but had O'Connor booked for simulation after he burst through a hail of bodies in the Preston box and went theatrically to ground.
In the 52nd minute Hume sprung the Doncaster offside trap to retrieve Darren Carter's punt forward but sent shot past the near post.
After the hour Preston's Canadian striker, again the danger man, expertly brought down a clearance from Turner and darted menacingly into the Doncaster box, where Friend diverted his goalbound shot for a corner.
O'Connor's teasing 70th-minute cross skimmed off Nicholson's head, forcing Turner into a splendid reaction save and the Rovers right-back was immediately involved in another flashpoint at the other end when Hume played in Johnson .
Although O'Connor's contact with the American appeared to be minimal, Preston's players furiously surrounded referee Scott Mathieson when a penalty was not awarded.
Doncaster pressed once more and after Franck Moussa's exquisite 25-yard volley cannoned back off the underside of the crossbar they were in front.
Simon Gillett's clever cut-back caught out the massed ranks of Preston defenders and left Stock free to rifle into the top corner from the edge of the box.
Preston immediately sent on Hayes for Johnson and the former Scunthorpe man snatched a quick-fire equaliser.
He immediately found space in the Doncaster area, forcing Kilgallon to divert his shot behind.
From the resulting corner Bongani Khumalo shot against the crossbar and Hayes was on hand to bravely nod home the rebound from a tight angle.