Connacht had a strong wind at their backs in the opening half, but failed to register the scores to reflect their lion's share of territory.
It was left to Ian Madigan to clinically pick off a converted try closing in on half-time, with the Leinster out-half profiting from his own quickly taken penalty.
He kicked a second half penalty and also added the extras to McGrath's late score, as Connacht suffered their second festive derby defeat in a week.
Leinster were much changed from last weekend's loss at table toppers Ulster, and a late switch saw Dominic Ryan replacing stand-in captain Shane Jennings (illness) in the back row.
Isaac Boss skippered the hosts from scrum half, while Connacht handed a debut to winger Matt Healy and welcomed back Eoin Griffin, Denis Buckley and Michael Swift into the starting line-up.
Eric Elwood's side were unable to build on a fine early break from Healy's wing colleague Danie Poolman, as Leinster regrouped in a physical first ten minutes.
Leinster's forwards grew into the contest, carrying well at close quarters, but the Swift-inspired westerners were finding holes in the hosts' defence.
Poolman just miscued a grubber kick as he latched onto a cross-field delivery from Dan Parks, and Leinster snatched a crucial turnover after a dangerous catch and run from Robbie Henshaw.
Having gained ground in a scrum, Parks was presented with his first shot at the posts but pulled the 14th minute penalty to the left and wide.
Lacking any territorial hold, Leinster had to maintain their discipline in defence and Jordi Murphy and Ben Marshall put in some meaty challenges.
Smart running from Andrew Conway and Fergus McFadden got Leinster into firing range near the half hour mark, and they showed the visitors exactly how potent they can be.
Andrew Goodman and Ryan both barged past defenders as the men in blue gained further momentum, and a quick tap penalty from Madigan saw him break out of a tackle to touch down from close range. Television match official Jude Quinn confirmed the grounding.
The out-half added a tricky conversion from the right and boosted by the seven-pointer, Leinster continually got over the gain-line as the interval approached.
On the restart, Brendan Macken went close to intercepting a high pass from Parks as Connacht looked to move the ball wide.
There was no sign of the midfield traffic giving way until Leinster sparked a series of pick and goes with 50 minutes on the clock.
Ryan, McFadden and man-of-the-match Boss were heavily involved before Devin Toner was denied close to the try-line. Connacht held out though, winning a turnover from the resulting scrum.
Madigan did increase Leinster's lead with a well-struck penalty towards the end of the third quarter.
Connacht showed flashes of clever attacking play, most notably when scrum half Kieran Marmion broke from a ruck near halfway and chipped towards the corner.
However, solid Leinster defence and cheap turnovers kept Connacht away from the whitewash and without a score to show for their efforts.
With Connacht having turned down a kickable penalty, Brett Wilkinson knocked on a pass from the ensuing lineout. Marshall then blocked an attempted kick from Parks and Leinster broke downfield.
The hosts pulled Connacht through phases of strength-sapping defence in the closing stages, and the pressure told when replacement prop McGrath, supported by Toner, thundered over to the right of the posts.
Leinster hunted for a third try in the dying minutes with teenage replacement Adam Byrne threatening on the right wing, but they had already done enough to get their play-off push back on track.
|Leinster Rugby Score Card|
|Connacht Rugby Score Card|