Scott Wight's try with only five minutes remaining looked to have sealed the win for the visiting Warriors but with 80 minutes up on the clock Tovey kept his nerve to slot home.
The home side came into the clash with two wins from two at Rodney Parade while Glasgow were on a run of five wins in a row in the RaboDirect PRO12.
And it was the away side who took the lead early on when Ruaridh Jackson, making his first Glasgow appearance of the campaign, having recovered from the hamstring injury he sustained against England at the Rugby World Cup, slotted over a penalty in the fifth minute.
Both Jackson and Steffan Jones then traded penalty misses in a cagey opening half that saw the away sides go in 3-0 up at the break.
But after half-time the game really came to life as Jackson slotted over his second penalty on 43 minutes to put Sean Lineen's men six points in front.
Jones then finally found the target with a penalty of his own to reduce the deficit to three six minutes later as the Dragons began to apply some pressure in the Glasgow half.
But Jackson continued to make them pay for their indiscipline and he stretched the lead back out to two scores with his third penalty of the night in the 58th minute.
Jones was then relieved of the kicking duties as Tovey, on for the ineffectual Tonderai Chavhanga, made his first penalty to make it only 9-6 to the Scottish outfit with a quarter of an hour remaining.
And five minutes later the Dragons were in front for the first time in the match as a concerted period of possession in the Glasgow half saw Riley dart over in the corner.
After lengthy deliberation from the television referee the outside centre was adjudged to have grounded the ball in the corner before being bundled into touch but Tovey struck the post with his conversion to make it 11-9 to the hosts.
The game appeared to be up for Glasgow as in addition to going behind replacement flanker Rob Harley was also yellow carded for an offence at the breakdown in the build up to the try.
Dragons winger Adam Hughes was then denied a try for a double movement in the closing stages but they would have sealed the win regardless if not for a moment of madness from flanker Lewis Evans.
With five minutes remaining a speculative chip forward from Wight, only recently on as a replacement for the Warriors, was shepherded over the try line by Evans but he dallied before touching down and Wight dove over to score.
The replacement fly-half then struck the post with his own conversion attempt meaning the away side only led by 14-11 with five minutes remaining, setting the stage for Tovey's stoppage time heroics.
|Newport Gwent Dragons Score Card|
|Glasgow Warriors Score Card|