Gloucester claimed a spot in the Amlin Challenge Cup by recording a 32-23 win over the Dragons at Rodney Parade on Sunday, with Akapusi Qera running in a hat-trick of tries.
But the all-important bonus point that extends Gloucester's European season arrived late, courtesy of a 74th-minute penalty try.
It meant Gloucester finished as runners-up in Pool Two, progressing into the second-tier Challenge Cup, where they will be joined by five group winners of that competition and two other Heineken clubs.
Nicky Robinson chipped in with three conversions and two penalties as Gloucester produced a powerful second-half performance.
The Dragons, six points clear at the break, managed a Rhodri Gomer-Davies try and a late Ashley Smith touchdown, plus two penalties, a drop-goal and conversion from James Arlidge, and one Jason Tovey conversion.
But Gloucester were good value for the win, condemning the Dragons to a sixth successive defeat in all competitions.
Gloucester were forced into a late change when their former England wing Lesley Vainikolo withdrew because of a stomach complaint, so Tom Voyce replaced him in a side seeking its first Heineken away win this season.
And the Dragons, whose European hopes ended through home and away defeats against Biarritz before Christmas, concluded their campaign minus injured influential forwards Luke Charteris and Joe Bearman.
Robinson and Arlidge exchanged penalties during a scrappy opening quarter before Gloucester burst into life through a well-crafted try.
Robinson was heavily involved, linking well with creative centre Eliota Fuimaono-Sapolu before delivering a scoring pass to the supporting Qera.
Gloucester led 10-3 after Robinson added the extras, yet any prospect of the visitors extending their advantage was dashed through a combination of poor discipline and weak defence.
Lock Dave Attwood, recently selected for the England Saxons squad, was sin-binned by French referee Christophe Berdos for illegally hampering Dragons possession, and a second Arlidge penalty narrowed the gap.
Then with Attwood still off and Gloucester temporarily reduced to 14 players, the Dragons struck in sparkling fashion.
Arlidge made the most of quality lineout possession, finding Gomer-Davies in space, and he finished majestically by rounding a hapless Voyce with ease.
Arlidge's conversion made it 13-10, before another Voyce blunder gifted the Dragons another score on the stroke of half-time.
Voyce had switched to full-back instead of an injured Olly Morgan, yet a terribly-sliced defensive clearance piled pressure on Gloucester and Arlidge made them pay through an effortless drop-goal.
It left the visitors having to manufacture three second-half tries and fight back from six points adrift in their quest for Challenge Cup qualification.
But they started the second period promisingly, breaching the Dragons' defence twice in four minutes.
A forward pass meant substitute wing Charlie Sharples' 42nd-minute effort was ruled out, yet Gloucester retained their concentration as Qera touched down following an Attwood catch and drive from a lineout.
Gloucester had increased the tempo, sacrificing kickable penalties in pursuit of tries, and the Dragons struggled to stay with them.
The home side's cause was hardly helped when replacement prop Ben Castle collected a yellow card for a technical infringement, which only served to increase Gloucester's level of optimism that they could fashion a bonus point win.
The Dragons found life increasingly difficult in the scrums, and a Robinson penalty nudged Gloucester 18-16 ahead entering the final quarter.
And a third try for Qera soon followed, this time the result of a clever lineout move that resulted in substitute hooker Olivier Azam charging upfield and sending the ever-present Fijian over.
Robinson slotted the wide-angled conversion, and then it was all hands to the pump for an ailing Dragons outfit.
But they were powerless to prevent the crucial fourth Gloucester touchdown arriving with 10 minutes left.
The Dragons could not halt a rampant Gloucester scrum, and referee Berdos awarded Gloucester a penalty try when home flanker Dan Lydiate kicked the ball away.
Robinson's conversion meant Gloucester were home and dry, 32-16 clear and able to reflect on a case of mission accomplished, even though Smith meant the Dragons had the last word.
Tries: Gomer-Davies, Smith
Cons: Arlidge, Tovey
Pens: Arlidge 2
Tries: Qera 3, Penalty Try
Cons: Robinson 3
Pens: Robinson 2
Yellow card(s): Attwood (Gloucester), 27; Castle (Dragons), 56.
Dragons: 15 Martyn Thomas, 14 Aled Brew, 13 Rhodri Gomer Davies , 12 Tom Riley, 11 Richard Fussell, 10 James Arlidge, 9 Wayne Evans, 8 Lewis Evans, 7 James Harris, 6 Danny Lydiate, 5 Luke Charteris, 4 Hoani Macdonald, 3 Gethin Robinson, 2 Tom Willis (capt), 1 Hugh Gustafson.
Replacements: 16 Steve Jones, 17 Ali McKenzie, 18 Ben Castle, 19 Gavin Thomas, 20 James Leadbeater, 21 Ashley Smith, 22 Jason Tovey.
Gloucester: 15 Olly Morgan, 14 James Simpson-Daniel, 13 Tim Molenaar, 12 Eliota Fuimaono-Sapolu, 11 Lesley Vainikolo, 10 Nicky Robinson, 9 Rory Lawson, 8 Gareth Delve (c), 7 Akapusi Qera, 6 Luke Narraway, 5 Alex Brown, 4 Dave Attwood, 3 Greg Somerville, 2 Scott Lawson, 1 Alasdair Dickinson.
Replacements: 16 Olivier Azam, 17 Nick Wood, 18 Pierre Capdevielle, 19 Adam Eustace, 20 Peter Buxton, 21 Dave Lewis, 22 Freddie Burns, 23 Tom Voyce.
Referee: Christophe Berdos (France)
Assistant referees: Eric Gauzins (France), Jean-Luc Rebollal (France)