Bernard Jackman’s men made a dream start as Jordan Williams raced over after five minutes before Matt Banahan and Jason Woodward hit back for the hosts.
Summer recruit Josh Lewis scored a superb team try, as Dragons were rewarded for discipline and patience after a spell of sustained pressure.
But Gloucester hit back in first half stoppage time with hooker James Hanson being shunted over for a 21-12 lead at the break.
Gloucester flexed their muscles at the start of the second half and powered clear with Franco Marais and Mariano Galarza going over before a penalty try was awarded.
However, Dragons showed plenty of heart with Dafydd Howells and Tiaan Loots rewarded with scores before a last minute effort from Rhodri Williams saw the region score 19 unanswered points in the final 18 minutes.
Head Coach Jackman made seven changes from the side that lost to Northampton, with internationals Cory Hill, Hallam Amos, Leon Brown and Elliot Dee all back in the squad.
And the game’s opening try came after five minutes with back row Huw Taylor the architect as he swooped over the ball to win a penalty deep in the Gloucester half for holding on, that Lewis kicked to the corner.
The Dragons pack drove towards the line, with captain Hill calling the shots, before the ball was spun wide right for Williams to press the accelerator and exploit the smallest of gaps.
Gloucester hit back, though, with fly half Cipriani floating a beautiful pass down the line for Banahan to crash over in the corner, with Twelvetrees adding the difficult extras for the lead.
Dragons looked to counter with Hill stealing a lineout and Amos hacking the ball into space and being supported by the marauding Ryan Bevington.
But turnover ball proved costly as Banahan broke away again before popping a simple pass back in field for Woodward to coast over.
Gloucester thought they had a third two minutes later, with a Cipriani try disallowed for a push on Jordan Williams, before great work from prop Leon Brown forced a penalty on the floor.
Giant second row Brandon Nansen then charged up the middle of the field to win a penalty for offside, but Lewis pulled the resulting kick wide.
Cipriani looked to open up Dragons again with a chip into space, but Dragons held firm under relentless pressure before Hill forced a knock-on with another thundering tackle.
The visiting pack were impressing as they won back ball at the set piece and put the squeeze on Gloucester. And it was through pack power that Dragons scored again, with several punishing phases making room for Lewis to dart over.
However, Gloucester struck on the stroke of half-time as Hanson was driven over and Twelvetrees added this third conversion from the touchline.
Early second half pressure from the hosts was rewarded as Marais went over before Galarza dived in from close range as the Cherry and Whites pulled clear.
Forward grunt from a driving maul was then rewarded with a penalty try as both teams started to unload their benches.
Replacement Adam Warren took his chance, cutting a superb line to latch onto Jordan Williams’ break and make try number three, with his offload finished off by Howells in the corner and converted by Henson.
Minutes later a driving maul powered towards the line and when Tavis Knoyle slung the ball out it was centre replacement Loots that burst over.
And a final flourish from the re-energised Dragons saw scrum half Rhodri Williams, back on for Knoyle, dive full length into the corner with the game’s final play.
06m J Williams t 0-5
10m Banahan t Twelvetrees c 7-5
16m Woodward t Twelvetrees c 14-5
38m Lewis t Lewis c 14-12
40m Hanson t Twelvetrees c 21-12
42m Marais t 26-12
46m Galarza t Twelvetrees c 33-12
53m Penalty t 40-12
62m Howells t Henson c 40-19
68m Loots t Henson c 26
80m R Williams t 40-31
Gloucester: 15 Jason Woodward, 14 Matt Banahan, 13 Henry Trinder, 12 Billy Twelvetrees, 11 Ollie Thornley, 10 Danny Cipriani, 9 Willi Heinz; 1 Josh Hohneck, 2 James Hanson, 3 Fraser Balmain, 4 Ed Slater, 5 Mariano Galarza, 6 Ruan Ackermann, 7 Lewis Ludlow, 8 Ben Morgan
Replacements: 16 Franco Marais, 17 Alex Seville, 18 Ciaran Knight, 19 Gerbrandt Grobler, 20 Jake Polledri, 21 Ben Vellacott, 22 Lloyd Evans, 23 Henry Purdy, Todd Gleave, Freddie Clarke, Will Safe, Gareth Evans, Callum Braley, Owen Williams, Mark Atkinson, Charlie Sharples, Tom Hudson.
Dragons: 15 Jordan Williams (Talbot-Davies 63), 14 Dafydd Howells (Gasson 67), 13 Tyler Morgan (Warren 56), 12 Jarryd Sage (Loots 56), 11 Hallam Amos (J Goodchild 63), 10 Josh Lewis (Henson 40), 9 Rhodri Williams (Knoyle 40-78); 1 Ryan Bevington (Harris 52), 2 Richard Hibbard (Dee 40), 3 Leon Brown (Fairbrother 52), 4 Brandon Nansen (Screech 61), 5 Cory Hill (Davies 52), 6 Huw Taylor, 7 Aaron Wainwright (Cudd 56), 8 Lewis Evans (Benjamin 56)
Replacements: 16 Elliot Dee, 17 Brok Harris, 18 Lloyd Fairbrother, 19 Joe Davies, 20 Nic Cudd, 21 Tavis Knoyle, 22 Gavin Henson, 23 Tiaan Loots, 24 Matthew Screech, 25 James Benjamin, 26 Adam Warren, 27 George Gasson, 28 Joe Goodchild, 29 Will Talbot-Davies
Referee: Tom Foley (RFU)