Media playback is not supported on this device
Ashton Hewitt went over to put the hosts in the lead while Angus O'Brien kicked the Dragons further ahead.
Two Jack Carty penalties put Connacht back into the game at the break before Hewitt touched down once more.
O'Brien's two drop-goals extended their lead but Niyi Adeolokun's try set up a tense finale for the Dragons.
The hosts had led Connacht by 15 points in the second half but a late resurgence by the Pro12 champions - Adeolokun showing tremendous pace to go over with just over 10 minutes left to play - ran them close.
The Dragons' win, their first in the Pro12 since beating Zebre in September, ended a run of seven consecutive defeats against Connacht, while the Irish province slipped to a second successive defeat after their loss to Leinster.
Kingsley Jones' side were without four players who are part of Wales' autumn international squad with Hallam Amos and the uncapped Cory Hill for the Test against Australia on Saturday.
Meanwhile, Tyler Morgan remains with Wales although he is not in the matchday squad, while Leon Brown is training with Rob Howley's squad while not being a full member.
Dragons head coach Kingsley Jones told BBC Radio Wales:
"It was critical. We've had a difficult start but some good performances at home. If we get the right results our way, we're only a few points behind those eighth and seventh places.
"To get that tonight going into the Anglo-Welsh games was really critical for it. For an hour I was pretty composed and I'm a pretty composed coach but the last 10 minutes my legs were trembling.
"We finished well in a few games at home lately. It was a tight affair and Connacht are a very good side - they'll play to the death and from anywhere and can hurt you from nothing."
Newport Gwent Dragons: Tom Prydie; Pat Howard, Sam Beard, Jack Dixon, Ashton Hewitt; Angus O'Brien, Sarel Pretorius; Phil Price, Thomas Rhys Thomas, Brok Harris, Nick Crosswell, Rynard Landman, Lewis Evans (capt), Ollie Griffiths, Ed Jackson.
Replacements: Rhys Buckley, Sam Hobbs, Lloyd Fairbrother, Matthew Screech, Nic Cudd, Tavis Knoyle, Geriant Rhys Jones, Adam Warren.
Connacht: Tiernan O'Halloran; Niyi Adeolokun, Bundee Aki, Peter Robb, Stacey Ili; Jack Carty, Caolin Blade, JP Cooney, Shane Delahunt, Conor Carey; Quinn Roux, Andrew Browne; Eoin McKeon, Jake Heenan, John Muldoon (capt).
Replacements: Dave Heffernan, Saba Meunargia, Dominic Robertson-McCoy, James Cannon, James Connolly, Conor McKeon, Shane O'Leary, Cian Kelleher,
Referee: George Clancy (IRFU)
Assistant referees: David Wilkinson (IRFU), Jason Bessant (WRU)
Citing commissioner: Jeff Mark (WRU)
Newport Gwent Dragons won just their second game in the Pro12 this season as they overcame a late Connacht comeback at Rodney Parade.