Gloucester (12) 29
Strokosch scored one of two Gloucester first-half tries
Tries: Qera 2, Strokosch, Balshaw, Narraway
Cons: Paterson 2
Ulster (7) 21
Tries: Bowe 2, Trimble
Cons: Wallace 2, O'Connor
Gloucester secured a home quarter-final in the Heineken Cup after a hard-fought victory over Ulster at Kingsholm.
First-half tries from Akapusi Qera and Alasdair Strokosch saw Gloucester lead at the break with Tommy Bowe responding for the visitors.
Andrew Trimble's second-half effort levelled the scores but Qera grabbed his second try of the game on the hour.
Iain Balshaw secured the bonus point before Bowe's late consolation, while Luke Narraway added a fifth late on.
Gloucester knew before the game began that qualification lay solely in their own hands and even though Ulster had nothing to play for they began in resilient fashion.
Paddy Wallace missed an early chance to give the visitors the lead with a penalty attempt and it took a piece of class from England centre Mike Tindall to unlock the organised Ulster defence.
Tindall cut through the Ulster midfield with some nifty footwork before off-loading to Qera who dived over for the first try of the game.
Ulster came back into it thanks largely to a fine break and superb looping pass from Isaac Boss who released winger Bowe to go over in the corner.
The home side got their noses in front before the break with flanker Strokosch bundling over from close range. Chris Paterson added the conversion to give Gloucester a 14-7 lead at half-time.
But again Ulster came back into it with Bowe turning creator for their second try.
The winger chipped forward and eventually collected his own kick before releasing Trimble to level the scores.
It stayed level until the hour when Qera exploited an overlap out wide after intense Gloucester pressure on Ulster's try line.
A flowing move by the Gloucester three-quarters eventually saw Balshaw go over in the corner to secure the bonus point for the home side.
But Ulster refused to lie down and Bowe dived over for his second try of the game, Wallace landing his third conversion.
Late on the rampaging Luke Narraway sidestepped Bowe to score the fifth and final Gloucester try.
Gloucester: Balshaw, Simpson-Daniel, Tindall, Allen, Vainikolo, Paterson, Lawson, Wood, Azam, Nieto, Buxton, Bortolami, Strokosch, Qera, Delve.
Replacements: Walker for Tindall (75), Lamb for Paterson (49), Cooper for Lawson (74), Titterrell for Azam (62), James for Bortolami (59), Narraway for Delve (70).
Not Used: Califano.
Sin Bin: Qera (79).
Ulster: Bartholomeusz, Bowe, Trimble, Steinmetz, McCrea, P. Wallace, Boss, Young, R. Best, D. Fitzpatrick, Harrison, Caldwell, McCullough, N. Best, Webb.
Replacements: Mallon for Bartholomeusz (72), O'Connor for Steinmetz (70), Campbell for Boss (75), Court for D Fitzpatrick (59), Brady for R Best (59), McMillan for Webb (59), C del Fava for Harrison (78)
Sin Bin: McCrea (35).
Ref: Romain Poite (France).