Gloucester broke Ulster hearts with a try five minutes into injury time to win a pulsating Heineken Champions Cup clash 38-34 at Kingsholm Stadium.

John Cooney looked to have inspired a memorable Ulster victory, but Gloucester triumphed through substitute fly-half George Barton’s try five minutes into stoppage time.

England international Danny Cipriani left Gloucester with immediate effect earlier this week, ending a two-and-a-half year stint in the west country.

And how Gloucester responded, delivering arguably their best performance under head coach George Skivington just six days after they were routed 55-10 by Lyon.

Gloucester conceded 17 points while their Wales wing Louis Rees-Zammit spent 10 minutes in the sin-bin, and it looked like proving costly until Barton came up trumps.

Ulster saw touchdowns by Cooney, full-back Michael Lowry and their former Gloucester fly-half Billy Burns, in addition to a penalty try, while Cooney added three conversions and two penalties.

Gloucester had two penalty tries, with Barton, Rees-Zammit and centre Mark Atkinson touching down, while fly-half Lloyd Evans kicked three conversions and a penalty.

Gloucester revived hopes of progressing in this season’s tournament, but Ulster are pretty much down and out following two defeats.

John Cooney scores Ulster's fourth try

Skivington made 12 changes from the side crushed by Lyon, with only full-back Kyle Moyle, prop Ciaran Knight and captain Lewis Ludlow remaining.

Burns, meanwhile, was among four switches in an Ulster side that also saw a start for Ireland back-row forward Jordi Murphy.

Gloucester showed no sign of any hangover from their drubbing in Lyon, and they went ahead in the seventh minute through a cleverly-crafted try.

Centre Chris Harris made initial ground, then full-back Kyle Moyle cut a superb attacking angle before Rees-Zammit applied a quality finish on his return to club colours following Wales’ Autumn Nations Cup campaign.

Evans converted from the touchline, but it proved a short-lived advantage as Ulster drew level from their first attack.

Impressive phase-play tested Gloucester’s defence, before Burns skipped through a huge gap from 10 metres out to touch down against his former club, with Cooney converting.

Evans restored Gloucester’s advantage through a short-range penalty, before Ulster paid a hefty price for collapsing successive mauls close to their line.

Referee Alex Ruiz sin-binned hooker Rob Herring for the first one, then lock Alan O’Connor received a yellow card after he pulled down the next one, with Gloucester awarded a penalty try and Ulster temporarily down to 13 men.

But Gloucester could capitalise on their numerical advantage, failing to score a point before both Ulster forward returned.

Cooney kicked a penalty to cut a gap, and he also had a penalty chance from just inside his own half, but the ball fell over as he ran up, and with the allocated kicking time expired, Gloucester were awarded a scrum.

Burns made another break on the stroke of half-time, but Gloucester snuffed out the danger and took a 17-10 lead into the interval.

Gloucester, with early sunshine being replaced by driving rain, took just two minutes of the second period to extend their lead.

And again it was their forwards that did the damage, relentlessly driving a close-range lineout before Atkinson joined the charge and touched down for a try that Evans converted via the crossbar into the face of a gusting wind.

Ulster needed a response, and it arrived eight minutes later when their backs carved open Gloucester’s defence and Lowry applied an outstanding finish. Cooney’s conversion cut the gap to seven points.

It got even better for Ulster approaching the hour-mark when they gained a penalty try following a deliberate knock-on by Rees-Zammit.

It meant the Gloucester wing was sin-binned and Ulster gained seven points following lengthy debate between Ruiz and television match official Rowan Kitt.