Robbie Benson gave Stephen Kenny’s side an early second half lead before a Kevin Horgan howler gifted Chris Shields his first league goal in 1,636 days since scoring against Sligo in August 2013.
The Lilywhites had played 149 league games since then with Shields involved in 123 of them but his fortuitous 62nd minute strike proved the difference on a night when Rovers’ goalkeeping problems were exposed once again.
Stephen Bradley’s side did go close to rescuing a point after Dan Carr became the first player to score against the Louth men this season with 15 minutes to play but Dundalk held out.
It was end to end in the opening half with the first big chance falling Rovers’ way.
Ronan Finn’s deep cross from the right to the back post found the inrushing Sean Kavanagh but, with only Gabriel Sava to beat, he fired wide.
Dundalk then had another let-off three minutes later when Finn beat Sava to Greg Bolger’s ball forward. His first touch took him around the keeper but Sean Gannon got back to clear.
The home side’s best chance didn’t arrive until the 26th minute when they were denied by the woodwork. Benson played Michael Duffy in behind Ethan Boyle on the left with his pull back picking out Pat Hoban whose shot cannoned back off the bar.
The frame of goal would then deny the Louth men again on 40 minutes. Hoban released Gannon on the right and after beating Kavanagh for pace his cross picked out Duffy whose downward header beat Horgan but came back off the butt of the post.
The breakthrough finally arrived seven minutes after the restart. Benson started the move with a good burst in off the left past Bolger. As he shaped to shoot he slipped Hoban in. His shot was saved by Horgan but the goalkeeper couldn’t keep hold of it with Benson following in to bundle the loose ball to the net.
Dundalk then doubled their advantage on 62 minutes following a howler by Horgan. There appeared little danger when Shields crossed from the right but somehow it crept in off the post.
The complexion of the game changed with 15 minutes remaining though as Dan Carr became the first man to score against Dundalk in the league this season when he headed home from Brandon Miele’s corner. That goal ended the home side’s run of 13 hours and 17 minutes without being breached.
The concession rattled the home side though and Rovers could have levelled three minutes later with substitute Gary Shaw played in on the left only to be denied by Sava, who 60 seconds later rather unconvincingly turned a Graham Burke effort on to his crossbar as Dundalk on.
SSE Airtricity League Premier Division: Dundalk 2, Shamrock Rovers 1
Sava; Gannon, Cleary, Folan, Massey; Shields, Benson; McGrath (O’Donnell 76), Adorján (Mountney 65), Duffy; Hoban (Tagbajumi 82).
Horgan; Boyle, Lopes, Grace, Byrne (Miele 69); G Bolger, Finn; Coustrain (Shaw 74), Burke, Kavanagh, Carr.
D Tomney (Dublin).