Newcastle Falcons secured a crucial 20-29 Aviva Premiership victory at Kingsholm which allows them to put off relegation for one more week.
Jimmy Gopperth scored four penalties in the first half to alongside an Ally Hogg try as the Falcons led 19-6 at half-time while Freddie Burns responded for the hosts.
Burns reduced the arrears in the second period with two three-pointers and Akapusi Qera crossed the whitewash.
Although the Gloucester fly-half then kicked the West Country team into the lead, a fifth Gopperth penalty and a Mark Wilson try sealed the win.
Despite finding themselves eight points adrift at the bottom of the table going into this match, Newcastle have enjoyed a mini resurgence under director of rugby Gary Gold.
And successive penalties from their Kiwi fly-half gave them an early 6-0 advantage. But Burns levelled the scores with two of his own.
However, Newcastle continued to battle and scrap for every inch, and were rewarded with Gopperth's third three-pointer.
Another from the kicking tee saw the visitors open up a six-point gap before Hogg went over for a potentially crucial try.
Once again, the Falcons' fly-half was on target with the conversion and suddenly, their chances of survival took a massive boost.
But Gloucester, perhaps unexpectedly, forced their way back into the match in the second half.
Burns reduced the arrears with a penalty and then added his fourth to take them to within losing bonus-point territory.
The visitors were now struggling to deal with the hosts' high tempo game and Qera powered over. Burns failed to add the extras, but he did convert a penalty opportunity soon after to put the West Country outfit in front.
It didn't last long, though, and Gopperth regained Newcastle's advantage before Wilson went over to confirm the victory and dent Gloucester's chances of qualifying for the Heineken Cup.
Final Score Gloucester 20 (6 ) Newcastle 29 (19)
Penalties: Burns 5
Tries: Hogg, Wilson
Penalties: Gopperth 5
Conversions: Gopperth 2
Referee: Tim Wigglesworth (47th Premiership game)
Jonny May; Charlie Sharples, Mike Tindall, Eliota Fuimaono-Sapolu, James Simpson-Daniel; Freddie Burns, Nick Runciman; Dan Murphy, Scott Lawson, Rupert Harden; Jim Hamilton, Alex Brown; Peter Buxton, Akapusi Qera, Luke Narraway (capt)
Replacements:Darren Dawidiuk, Yann Thomas, Shaun Knight, Will James, Alasdair Strokosch, Dave Lewis, Tim Taylor, Tim Molenaar
15 Greg Goosen, 14 Corne Uys, 13 Jamie Helleur, 12 James Fitzpatrick, 11 Ryan Shortland, 10 Jimmy Gopperth (c), 9 Peter Stringer, 1 Jonny Golding, 2 Rob Vickers, 3 Euan Murray, 4 James Hudson, 5 Tim Swinson, 6 Ally Hogg, 7 Will Welch, 8 Adam Balding
Replacements: 16 Matt Thompson, 17 Grant Shiells, 18 James Hall, 19 James Goode, 20 Taiasina Tu'ifua, 21 Mark Wilson, 22 Will Chudley, 23 Tom Catterick