A 90th minute winner form Simon Madden broke Finn Harps’ hearts at Tallaght Stadium after the Donegal side had recovered from 2-0 down.
Terrific early strikes from distance from David McAllister and Ronan Finn looked to have Rovers in control.
Harps refused to lie down, though, and stormed back in the second half to level through Caolan McAleer and Paddy McCourt.
But Madden then struck at the death to steal the points for Rovers as they leapfrogged Harps up into the top half of the SSE Airtricity Premier Division table.
Rovers boss Stephen Bradley rang the changes following last week’s defeat at St Patrick’s Athletic with four switches to his starting eleven in a 3-5-2 formation, including full debuts for 18-year-old Sam Bone in midfielder and striker Dean Dillon, just 17.
With right-back Damien McNulty not fit, McCourt came into Finn Harps’ midfield in their only change from their win over Sligo Rovers last time out.
Rovers started purposefully and were ahead inside two minutes, with Harps having scarcely touched the ball.
It came out of nothing as midfielder McAllister availed of plenty of space some 30 yards out to unleash a thumping right-foot drive that arrowed to the back of the net off the underside of Ciaran Gallagher’s crossbar.
Sean Houston glanced a header wide from Ethan Boyle’s free kick minutes later at the other before another stunning goal increased Rovers lead on 14 minutes.
Skipper Finn collected Trevor Clarke’s ball in from the left, got his head up, before planting a crisp right-footer from 25 yards in off Gallagher near post.
Despite losing striker Ciaran O’Connor to injury, Harps worked hard to try to get back into the game. McAleer came close to snatching a goal back on the half hour when taking advantage of some slack Rovers defending to get in behind and work home ‘keeper Tomer Chencinski with a shot.
McCourt then weighted a perfect ball through for the run of Danny Morrissey on the left. His shot from a tight angle hit the outside of a post.
Harps were much the better side into the second half as they chased the game, deservedly pulling a goal back on 71 minutes.
Sean Houston played McAleer in and the winger drilled the ball under Chencinski to the net.
Ollie Horgan’s side then duly got their equaliser on 76 minutes from a free kick after substitute Eddie Dsane had bene fouled by McAllister.
Ex-Northern Ireland international - and former Hoops midfielder - McCourt stepped up to find the bottom corner with a low through a poor defensive wall.
But Rovers had the final say with a 90th minute winner. Substitute Michael O’Connor got to the end line to cross.
And when Harps failed to clear, Madden lobbed a delightful side-foot volley to the far corner of the net.
Shamrock Rovers: Tomer Chencinski; Roberto Lopes, Danny Devine, Dave Webster; Simon Madeen, David McAllister (Sean Boyd 80), Sam Bone (Brandon Miele 67), Ronan Finn, Trevor Clarke; Graham Burke, Dean Dillon (Michael O’Connor 68)
Finn Harps: Ciaran Gallagher; Ethan Boyle, Kilian Cantwell, Ciaran Coll, Gareth Harkin; Caolan McAleer, Paddy McCourt, Jonny Bonner; Danny Morrissey (Eddie Dsane 68); Sean Houston; Ciaran O’Connor (Barry Molloy 24).
Referee: Sean Grant (Wexford).