Ulster bought themselves a Heineken Cup lifeline tonight by staging a superb comeback at a rainswept Ravenhill tonight.
Gloucester seemed to have done enough in their quest for a priceless away victory which would have secured a win-or-bust Pool Six showdown with French champions Stade Francais on Sunday week.
However, Ulster recovered from a 12-3 interval deficit by scoring 11 unanswered second-half points through a Bryn Cunningham try and two David Humphreys penalties. Humphreys landed his winning kick seven minutes from time, keeping alive Ulster's outside chance of a quarter-final place.
Gloucester though, now have to beat Stade at Kingsholm and probably secure a winning bonus point in the process.
Henry Paul, controversially discarded by England boss Andy Robinson during the world champions' defeat against Australia five weeks ago, emphatically showed he possesses a big-match temperament by kicking three penalties in terrible conditions.
And Simon Amor's 40th-minute drop-goal helped give Gloucester a healthy advantage before the wheels spectacularly came off their wagon.
While Paul and Amor shared the scoring honours, Gloucester's pack - with Boer, England prop Phil Vickery and number eight Adam Balding prominent - gave scrum-half Andy Gomarsall a platform to dictate matters.
But it ultimately proved to no avail as Gloucester once again choked on a big Heineken Cup occasion, confirmed when Amor sent a late drop-goal attempt wide.
Ulster, who still had an outside chance of reaching the knock-out stages, elcomed back fit-again prop Simon Best as they looked to avenge a 55-13 mauling at Kingsholm in October.
The 11,500 crowd included about 2,000 Gloucester fans, as Ulster went in search of their 12th successive Heineken Cup home win.
Humphreys was narrowly wide with a fourth-minute penalty strike from 50 metres but Paul found his range 10 minutes later, rifling over a kick just inside Ulster's half which deservedly edged Gloucester ahead.
Paul doubled their lead with a 29th-minute penalty and Gloucester proved far more comfortable than Ulster on the ball, but they also took their chances, a fact underlined when Paul completed his penalty hat-trick after an Ulster scrum infringement five minutes before half-time.
Ulster, at least in the first half, could not match the efficiency of Gloucester's work around the forward fringes, although Humphreys booted a long-range penalty to open their account before a lively 40 minutes ended in controversial fashion.
Amor's drop-goal restored a nine-point lead for the visitors, but Ulster wing Tommy Bowe then had a try disallowed after he collected a kick from Humphreys.
Welsh referee Nigel Whitehouse ruled that Bowe was offside when he gathered possession - television replays suggested it was a poor decision - and as the official trooped off to boos, Gloucester left the arena knowing their job was half done.
But Ulster struck first after the break, courtesy of an onside Bowe catching another Humphreys kick and sending a supporting Cunningham over.
Gloucester's response, inspired by a clever Paul chip, almost produced a try for wing Marcel Garvey, yet he could not pick up possession cleanly and the chance went begging.
And Gloucester endured more frustration on the hour-mark. Garvey sprinted clear into Ulster's 22 before he was hauled down, but with visiting attackers queuing up out wide, centre Terry Fanolua dropped the ball.
Humphreys then had the final say, landing two penalties in six minutes.