Leinster suffered a 25-22 defeat at the Dragons on Sunday in a result that leaves them eight points adrift of the top four spots in the PRO12 table.
The Dragons went into an 8-0 lead through Jason Tovey's penalty and T. Rhys Thomas' try, but the Irish province fought back, scoring 22 unanswered points via two Ben Te'o touchdowns and another from Jimmy Gopperth.
That appeared to set the visitors on their way to a comfortable victory, but the Dragons had other ideas and scores from Jack Dixon and James Benjamin (two) shocked the Dublin-based outfit.
Matt O'Connor's men have endured a difficult season in the league and went into the game nine points behind the Ospreys in fourth. They therefore needed a bonus-point victory to boost their play-off credentials, but the visitors struggled to assert their authority on proceedings in the opening stages.
Just three minutes had elapsed when Tovey kicked a penalty before Thomas crossed the whitewash to take the hosts 8-0 clear.
However, the Irish province gradually grew into the encounter and, following Gopperth's three-pointer which reduced the arrears, Te'o levelled matters by weaving his way through two would-be tacklers.
The mini comeback was then completed when Gopperth capped an excellent individual display by sprinting 30 metres to touch down. Leinster's fly-half added the conversion as they led 15-8 at the break before that advantage was extended soon into the second period through their outside centre, Te'o.
Despite going fourteen points behind, the Dragons continued to move the ball through the hands looking to put pressure on the opposition rearguard and it eventually paid off. After a spell close to visiting line, Dixon powered over to reduce the deficit to 22-15.
Te'o, a former rugby league player, then received a yellow card for tackling without the arms and that gave the Welsh region further incentive to get back into the contest.
They duly moved closer to O'Connor's team as Benjamin latched onto a charged-down kick before the same player was the beneficiary of excellent work from Wales' international Taulupe Faletau.
That effort spurred Leinster into a late charge but the Dragons remained resilient and held on for a remarkable win.
Tries: TR Thomas, Dixon, Benjamin 2
Tries: Te'o 2, Gopperth
Con: Gopperth 2
Dragons: 15 Jason Tovey, 14 Tom Prydie, 13 Tyler Morgan, 12 Jack Dixon, 11 Hallam Amos, 10 Dorian Jones, 9 Jonathan Evans, 8 Taulupe Faletau, 7 Nic Cudd, 6 Nick Crosswell, 5 Cory Hill, 4 James Thomas, 3 Brok Harris, 2 T.Rhys Thomas (c), 1 Phil Price.
Replacements: 16 Rhys Buckley, 17 Luke Garrett, 18 Dan Way, 19 Matthew Screech, 20 James Benjamin, 21 Luc Jones, 22 Pat Leach, 23 Geraint Rhys Jones.
Leinster: 15 Zane Kirchner, 14 Dave Kearney, 13 Ben Te'o, 12 Gordon D'Arcy, 11 Darragh Fanning, 10 Jimmy Gopperth, 9 Eoin Reddan, 8 Jack Conan, 7 Shane Jennings (c), 6 Dominic Ryan, 5 Mike McCarthy, 4 Ben Marshall, 3 Martin Moore, 2 Richardt Strauss, 1 Jack McGrath.
Replacements: 16 Aaron Dundon, 17 Michael Bent, 18 Tadhg Furlong, 19 Ross Molony, 20 Jordi Murphy, 21 Luke McGrath, 22 Noel Reid, 23 Luke Fitzgerald.
Referee: Marius Mitrea (Italy)
Assistant referees: Ben Whitehouse (Wales), Sean Brickell (Wales)
TMO: Derek Bevan (Wales)