Glasgow secured their first win of the Pro12 campaign by condemning Leinster to their second defeat at the RDS.
Leinster led 13-10 at half-time thanks to an Ian Madigan try and eight points from the boot of full-back Isa Nacewa.
Nick Campbell scored a try for Glasgow, with Scott Wight adding a penalty and a conversion before the interval.
Peter Horne touched down for the Warriors in the second half, Duncan Weir kicking eight points, while Nacewa added two penalties for the Irish side.
Leinster's 28-match winning streak in regular-season games at the RDS was brought to an end, despite the province enjoying the majority of possession and plenty of time in the visitors' 22.
Nacewa's penalty gave Leinster a 3-0 lead inside three minutes but despite young out-half Madigan and Nacewa showing glimpses of their attacking prowess, they faltered in the final third.
Glasgow had an opportunity to level the scores after 12 minutes but Wight's penalty from halfway cannoned back off the right post.
Leinster responded with another period of sustained pressure, yet a second Nacewa penalty was all they could show for being camped inside the Glasgow half for a 10-minute spell.
Wight made up for his earlier miss when he split the posts with a penalty from the right.
Leinster were then left to rue their missed chances on the half hour when Campbell dived over after Leinster failed to clear their lines.
Wight converted to give the Scottish side a 10-6 advantage.
Leinster's stuttering attack finally crossed the whitewash approaching half-time.
David Kearney broke into the Glasgow 22 and linked with Dominic Ryan who offloaded for Madigan to score by the posts.
Nacewa added the conversion to give the home side a deserved 13-10 lead at the break.
Glasgow's replacement out-half Weir and Nacewa exchanged penalties in the opening five minutes after the restart before play was held up for what looked like a serious injury to flanker Ryan.
Nacewa and Weir again traded penalties, following the sin-binning of Glasgow captain Rob Harley.
At 19-16, Leinster seemed to be in control but again they lacked a clinical edge and failed to convert their pressure into points.
It came back to haunt them when Horne skated through the home defence for a 66th-minute try which Weir added the extras to.
Leinster boss Joe Schmidt had to withdraw Luke Fitzgerald due to injury, and Brendan Macken, a try-scorer against the Dragons last weekend, was brought into the fray.
Kevin McLaughlin also picked up a knock which will require a scan.
Leinster recycled the ball well from a lineout after Madigan found touch but were thwarted by a resolute Glasgow defence on a number of occasions, and the Warriors held on.
Leinster: Isa Nacewa; Fionn Carr, Eoin O'Malley, Luke Fitzgerald, David Kearney; Ian Madigan, Cillian Willis; Heinke van der Mere, Richardt Strauss, Jamie Hagan; Kevin McLaughlin, Devin Toner; Rhys Ruddock (capt), Dominic Ryan, Leo Auva'a.
Replacements: Aaron Dundon for Auva'a (67), Nathan White for Hagan (48), Damian Browne for McLaughlin (67), Jordi Murphy for Ryan (46), John Cooney for Willis (74), Brendan Macken for Fitzgerald (67).
Not used: Jack McGrath, Darren Hudson
Glasgow Warriors: Stuart Hogg, Federico Aramburu, Rob Dewey, Troy Nathan, Colin Shaw, Scott Wight, Henry Pyrgos, Ryan Grant, Finlay Gillies, Ed Kalman, Tom Ryder, Nick Campbell, Rob Harley (captain), Chris Fusaro, Rory Pitman.
Replacements: Pat MacArthur for Gillies (41), Mike Cusack for Kalman (41), James Eddie for Campbell (60), Duncan Weir for Wight (41), Ryan Wilson for Pitman (41), Colin Gregor for Pyrgos (60), Peter Horne for Dewey (58).
Not used: Gordon Reid