Leinster fly-half Jimmy Gopperth was on target with three penalties and the conversions of hooker Aaron Dundon and centre Noel Reid's tries.
Centre Ross Wardle rounded off a screaming move for the Dragons for their only try with the kicking duties shared by wing Tom Prydie and outside-half Jason Tovey. The wing booted a penalty, while Tovey converted the touchdown and added three penalties of his own.
Both sides had plenty to prove after defeats last week. The Dragons, in sixth place before kick-off, were thrashed by the Ospreys 40-17 at The Liberty Stadium while fifth-placed Leinster went down in Limerick to Munster 19-15.
The Achilles heel of the Dragons, their set-piece, was hammered in the opening moments and Leinster's second row pair of Quinn Roux and Tom Denton began to stamp their mark on the line-out situation.
Yet, with bravery, the home side kept out the Leinster threat as the game stagnated for half an hour.
Former Newcastle stand-off Gopperth was the first half star as he booted a neat 30-metre penalty, his second attempt at goal in the game, to put the visitors ahead - although the home fans were not pleased by some of the decisions going against them during the period.
But, if Gopperth had a good half for Leinster, Prydie was the Dragons' hero. He posted a penalty from 45 metres to tie the scores up at 3-3 after 15 minutes and was part of the brilliant move that saw Wardle cross from a move from halfway.
The final 10 minutes of the half were the most lively as Prydie tried another long-range penalty but saw it go wide before Gopperth landed his second penalty to reduce the arrears to four points.
Tovey restored the home side's seven-point with a 10-metre penalty when Leinster strayed offside.
It signalled a ding-dong half in which Gopperth got Leinster back into the match with another penalty as they fought to regain the initiative.
The Dragons' fortunes were not helped by the loss of lock Adam Jones for 10 minutes in the sin-bin when he was accused of taking the man out of a line which, within minutes, saw Leinster take the lead for the first time.
They pounded the home line and, when hooker Aaron Dundon surged through a pile of bodies, the television official decided he had got the ball down, leaving the conversion easy.
It seemed Leinster had wrapped up the game and that the Dragons would not even get a losing bonus point for their efforts when centre Reid finished off a sparkling move down the left from half-way.
But the Dragons would not give up and Tovey punished the Irishmen's mistakes with two further penalties before the Welsh side were camped on the opposition line in the dying moments but could not get over for the crucial try to win the game.