The Argentinian international kicked four penalties and converted Leinster’s two tries from Rob Kearney and Kieran Lewis early in the second half to hold on for a scrappy first win of the season.
Four times Michael Cheika’s home side coughed up restarts, allowing the Scots to recover and reel them in.
A classier effort from the Warriors could have seen them bag a surprise victory but the momentum of a Rory Lamont try on the hour was never built on.
Dan Parks, taking over captaincy duties from the injured Jon Petrie, controlled matters in the first half as Hugh Campbell’s men led 13-9 at the break.
Scotland lock Craig Hamilton lurched his 6ft 8ins frame over and under the Leinster posts in the ninth minute after a quick turnover, allowing Parks to convert and tally up a 7-0 lead for Glasgow.
Ireland Under-19 captain Kearney missed a 30-metre penalty for a quick reply, but with Leinster enduring the same lineout problems which dogged them in Swansea on Sunday, Contepomi steadied the Irishmen with a 22nd-minute penalty.
Contepomi sandwiched a 34th-minute penalty from Parks with two of his own, but the 27-year-old fly-half Parks managed to extend Glasgow’s lead to four points in injury-time with a neatly struck drop goal.
With ball in hand, Leinster always looked the more potent and two tries inside the first quarter-hour of the second half pushed them 23-13 in front.
Contepomi and Lewis combined to set teenager Kearney free on 44 minutes and he gathered his own kick ahead, with Glasgow full-back Colin Shaw dithering, to score.
Contepomi converted and added the extras to Ireland centre Lewis’ effort - a well-taken sprint round to the posts after Guy Easterby had stolen possession.
The visitors never gave up hope and Leinster’s failure to shut out the game led to replacement scrum-half Graeme Beveridge setting up Lamont’s try.
His long cut-out pass freed hooker Scott Lawson into the Leinster 22 and Lamont galloped up on his shoulder to score.
Parks converted and swapped a further penalty with Contepomi but Cheika’s side held on.
: Dempsey, Brown, Lewis, Contepomi, Kearney, Warner, Easterby, Lyne, Jackman, Green, Byrnes, Gissing, Potts, Gleeson, Heaslip.
: Shaw, Lamont, Craig, Barrow, Roberts, Parks, Pinder, Murray, Lawson, Harrison, Barker, Hamilton, Swindall, Wilson, Dearlove.
: Phil Fear (WRU).