The visitors led 16-3 at half-time thanks to hooker Corey Flynn's try from a rolling maul and three penalties by Finn Russell.
Dragons fought back strongly to lead through early second-half tries by Sam Hobbs and Jack Dixon.
But prop Alex Allan's solo score restored Glasgow's advantage before a late Russell penalty sealed victory.
Having previously suffered back-to-back defeats against Cardiff Blues and league leaders Ulster, Glasgow's win takes them up to third place in the Pro12 table.
They had to defend early on as the Dragons, themselves smarting from a their 27-11 loss to Treviso, enjoyed long spells of possession.
However, the hosts were wasteful and were punished by Russell's boot and a well-worked set-piece score from former New Zealand hooker Flynn.
The Dragons responded perfectly after the interval, with prop Hobbs spinning over from close range before centre Dixon bulldozed his way through after an incisive counter-attack.
Their 17-16 lead did not last long, however, as Glasgow's Allan belied his status as a loose-head prop to sidestep and sprint his way to a fine individual try.
Russell's fourth penalty added a final gloss to Glasgow's win and denied the Dragons a losing bonus point.
Dragons: Carl Meyer, Pat Howard, Sam Beard, Jack Dixon, Hallam Amos; Nick Macleod, Sarel Pretorius; Sam Hobbs, Thomas Rhys Thomas, Brok Harris, Matthew Screech, Rynard Landman, Nick Crosswell, Nic Cudd, Lewis Evans (capt).
Replacements: Rhys Buckley, Thomas Davies, Craig Mitchell, Cory Hill, Harrison Keddie, Charlie Davies, Angus O'Brien, Tom Prydie.
Glasgow: Peter Murchie; Tommy Seymour, Mark Bennett, Alex Dunbar, Rory Hughes; Finn Russell, Henry Pyrgos (co-Captain); Alex Allan, Corey Flynn, Sila Puafisi, Rob Harley, Jonny Gray (co-Captain), Lewis Wynne, Fraser Brown, Josh Strauss.
Replacements: Pat MacArthur, Djustice Sears-Duru, D'arcy Rae, Robert McAlpine, Matt Fagerson, Ali Price, Rory Clegg, Leonardo Sarto.
Referee: Andrew Brace (IRFU, 14th competition game)
Assistant Referees: Frank Murphy (IRFU), Aled Evans (WRU)
Citing Commissioner: Gwyn Bowden (WRU)
TMO: Kevin Beggs (IRFU)
Glasgow ended a run of two successive defeats with a hard-earned away win against Newport Gwent Dragons.