The 63rd minute dismissal of Rovers centre-back, Jason McGuinness, for a second yellow card caution, turned the game on its head, even if Rory Patterson squandered a penalty kick following that incident.
Derry created the first chance when they hit Rovers on the counter-attack through Patrick McEleney but his cross into the danger area was poor, the ball curling high over the Rovers crossbar after eight minutes.
At the other end, Derry keeper Gerard Doherty won a race for possession as Dean Kelly raced through the home defence just three minutes later.
Rovers were presented with a superb chance to break the deadlock in the 43rd minute.
The ball dropped into Kieran Marty Waters inside the area but rather than go for goal himself, the winger opted to pass to a team-mate and the chance was lost.
Derry looked a change side after the break.
In the 46th minute the large screamed for a penalty after Patterson hit the ground but referee Paul McLaughlin waved play on.
In the 62nd minute Derry were presented with a superb chance to break the deadlock when McGuinness was shown a second yellow card when challenging Ryan McBride inside the penalty area. Patterson took the resultant penalty but the striker dragged the ball wide.
In the 77th minute Derry threatened again when Philip Lowry’s effort crashed off the butt of the post.
Derry’s pressure finally paid off in the 88th minute when Michael Duffy brought the attendance to life with a superb finish.
Patterson dummied a through ball from Barry Molloy and the 20-year-old finished with aplomb.
Patterson made up for his penalty miss during injury-time when he lashed the ball high into the net having been set up by Dooley.
DERRY CITY: Doherty; Molloy, McBride, Barry, Jarvis; Dooley, McNamee, Lowry, Duffy; P. McEleney; Patterson.
SHAMROCK ROVERS: Murphy; Madden, Kenna, MGuinness, D. O’Connor; McPhail Robinson, 60), Cregg, Brennan, Waters (KIlduffy, 77); Finn, Kelly.
Referee: P. McLaughlin (Monaghan).