Ulster kept alive their slim Heineken Cup hopes and dented Gloucester's chances of making the knockout stages by claiming a gutsy win at Ravenhill.
HEINEKEN CUP POOL 6
Ulster (3) 14:
Pens: Humphreys 3.
Gloucester (12) 12:
Pens: Paul 3.
Drop goal: Amor
Three first half penalties from Henry Paul helped Gloucester to a 12-3 interval lead although Tommy Bowe was controversially denied an Ulster try.
Bryn Cunningham's 46th minute try got Ulster right back into the contest.
Two David Humphreys penalties then edged Ulster ahead and they repelled a late Gloucester rally.
For Gloucester to make the quarter-finals, they now have to beat Stade at Kingsholm and secure a winning bonus point in the process.
Ulster need to pick up a five-pointer against Cardiff next Sunday to be in with a chance of squeezing through as one of the two second-placed teams, but that is highly imaginative.
It was the Premiership club who made the livelier start and a try seemed on in the sixth minute after Andy Gomarsall's tap penalty but Adam Balding's pass squirmed into touch instead of finding a colleague.
Gloucester control then yielded a 13th minute penalty which Paul knocked over from over 50 yards to put the visitors ahead.
Humphreys then tried to rally the home team by producing a burst deep into Gloucester territory after taking a tap penalty but he just failed to find Roger Wilson with the pass.
Ulster scrum-half Kieran Campbell stupidly gifted Gloucester three more points in the 29th minute by conceding a penalty with a professional foul which Paul gratefully stroked over from 40 metres.
Gloucester maintained the pressure to force another penalty in the 33rd minute after a collapsed scrum with the finger pointed at Simon Best and Paul made no mistake to add another three points.
Ulster finally opened their account in the 39th minute with Humphreys thumping over a penalty from just short of halfway to cut Gloucester's lead to six points.
Gloucester responded immediately with Simon Amor slotting a drop goal in injury-time to give them a comfortable looking nine-point lead in the dreadful conditions.
There was still time for Ulster to be controversially denied a try before the interval with Bowe adjudged offside by referee Nigel Whitehouse after the winger had fielded a crossfield kick by Humphreys.
Despite the harsh decision, Humphreys repeated the tactic six minutes into the second half and once again Bowe brilliantly fielded before setting up Cunningham for the try.
Humphreys missed the difficult conversion but Ulster were back in the game.
The home side then had an immediate let-off when the Marcel Garvey knocked the ball on inches short of the Ulster line when a try seemed certain.
On the hour, Garvey charged for the Ulster line again but Paul Steinmetz and Tyrone Howe combined to produce a try-saving tackle and from the follow-up, Gloucester centre Terry Fanolua dropped the ball.
By now, Ulster had rung the changes with Andy Ward, Paul Shields and Rowan Frost introduced to the pack.
With 11 minutes of normal time left, Humphreys cut Gloucester's lead to a single point by slotting a superb penalty from near the touchline.
Humphreys repeated the dose in the 72nd minute to put Ulster ahead after more pressure had forced another Gloucester infringement.
Gloucester pressed hard in the closing minutes and Amor was inches wide from a drop goal effort at the start of injury-time as Ulster extended their Heineken Cup winning run at Ravenhill to 12 games.
Ulster: Cunningham; Bowe, Steinmetz, Maggs, Howe; Humphreys Campbell; S Best, R Best, Moore, Longwell, McCullough, Feather (capt), N Best, Wilson.
Replacements: Shields, McCormack, Frost, Ward, Doak, Larkin, Wallace.
Gloucester: Goodridge; Garvey, Fanolua, Paul, Bailey; Amor, Gomarsall; Bezuidenhout, Parkes, Vickery, Eustace, Brown, Boer (capt), Hazell, Balding.
Replacements:Elloway, Sigley, Wood, Buxton, Forrester Page, Mauger.
Referee: Nigel WHitehouse (WRU).