A good victory for the Ospreys would have put them in a great position to secure a play-off place and pressurise Ulster for second place.
But they went into the half-time break trailing by two points after 40 minutes of highly intense rugby. The lead changed hands four times in that period, with the Dragons having the slight edge in possession and territory.
Wales fly-half Dan Biggar grabbed the opening points with a penalty after three minutes but just seconds later, a clinical move down the left by the Dragons left the Ospreys floundering and centre and stand-in captain Ashley Smith away to score a great try.
Number 10 Jason Tovey converted but the lead was not to last as former Wales skipper Ryan Jones was on the end of a move inside the home 22 to squeeze in at the corner after centre James Hook provided the scoring pass.
It did not help the Dragons cause that full-back Will Harries went off with a leg injury but they settled down with Tovey restoring the lead with a crisply-struck penalty before adding another on the half hour mark.
Tovey then sent a lovely ball past the Ospreys defence but, with the try-line wide open, winger Aled Brew could not get the ball from between his legs to run in unopposed.
It was feisty up front too, with both hookers, Lloyd Burns and Huw Bennett, warned by referee Nigel Owens after a bust-up between the packs at a scrum.
Biggar booted a second penalty to make it 13-11 but, when the Dragons put pressure on the Ospreys line after the break, scrum half Wayne Evans dived through a gap to score and give replacement Matthew Jones a simple conversion.
Tovey kicked down the wing again for Brew to chase, the third time they had tried the tactic, and this time it paid off as Ireland international Tommy Bowe attempted to kick the loose ball over the in-goal line only to miss it completely and let Brew in for a try.
And just before the hour, Brew made it two when Tovey tried to kick down the wing again, the ball bounced off a defender for the well-placed winger to receive a pass 40 metres from the line, round Hook and score in the corner.
That gave the Dragons a bonus point and it was seemingly all one-way traffic, until the Ospreys bounced back with a vengeance.
Firstly, Bowe made up for his earlier error by running inside and out of the home defence for a try in the corner.
Then, a cross-field kick from Hook was superbly caught by winger Nikki Walker for a run-in at the opposite corner.
The Dragons regained some composure but Hook steered the Ospreys into attacking situations and, as the clock ran down, the defending champions were camped on the home line with only desperate defence keeping them out.
Nonetheless, despite a series of attacking scrums, one last mistake by the Ospreys gave the Dragons a penalty in their own 22 that Tovey heaved into touch to seal a deserved triumph.
Giving his reaction afterwards, Dragons boss Darren Edwards said: "I thought that was probably the best performance we've had in the two years I've actually been here.
"If we play that way, we can beat anybody. That's a quality Ospreys team we've beaten today. I thought it was a great game of rugby. It must have been great to watch as a spectator.
"We need to play to win games rather than hoping we are going to win games. I thought we did that superbly. I believe in these players. We've done it before and we can do it again.
"We need to make sure we capitalise on that performance and have the same again. Consistency is our problem and that's something I'm looking to change."
|Newport Gwent Dragons Score Card|
|Ospreys Score Card|