Two tries from Darren Dawidiuk and Jonny May in the last five minutes of extra time gave Gloucester a 40-32 win over Connacht and a place in next week's Champions Cup play-off final.
In a thrilling game, Gloucester trailed going into the last minute of normal time before a converted try by Bill Meakes saved the game and sent the match into extra time.
The Aviva Premiership side now face Bordeaux-Begles at Sixways in Worcester next Sunday, with the winners securing the last Champions Cup spot.
Charlie Sharples, Bill Meakes and Ross Moriarty, Dawiduik and May scored tries for Gloucester with Greig Laidlaw adding two penalties and three conversions. James Hook also kicked a penalty
Matt Healy (two), John Cooney and Jack Carty were the Connacht tryscorers, with Carty kicking two penalties and three conversions.
Gloucester made wholesale changes from their defeat at Bath. All their leading players were recalled with only Henry Purdy, Nick Wood and Dan Thomas remaining from last week's starting line-up. Bill Meakes and Moriarty also returned after serving their suspensions.
Connacht were without the injured Kieran Marmion, with Cooney replacing him at scrum half in one of two changes from last week's home defeat to Ospreys. The other saw George Naoupu coming in for Andrew Browne in the second row.
Gloucester started strongly, winning a line-out in the opposition 22 and had little trouble in driving over the Irish line with Moriarty scoring the second minute try which Laidlaw converted.
Connacht soon had their first chance for points and were on the scoreboard when Carty made no mistake with his penalty attempt, before they shocked the home side with their first try.
A poor pass from Meakes put Sharples under pressure and when the full-back was tackled the ball ran loose, Cooney picking it up before outpacing the Gloucester cover on a 50-metre run to the line.
Gloucester deservedly drew level with a Laidlaw penalty to make it 10-10 at the end of the first quarter, then regained the lead with an excellent try.
From a line-out on halfway, a well-timed pass from Meakes sent Hook clean through a gap in the visitors' defence before the Welshman gave Sharples a clear run-in.
Within minutes, Connacht were back in front when a neat off-load from Fionn Carr created a try for Carty, which the outside half converted.
The referee was having problems with repeated infringements at the scrum area and after 34 minutes issued yellow cards to rival props John Afoa and Denis Buckley.
Connacht led 17-15 at the interval but following the restart, skilful play from Jonny May and Hook secured the hosts a platform in the opposition 22. The Irish were penalised for Laidlaw to kick his second penalty.
Laidlaw surprisingly missed another penalty and Connacht made him pay by breaking out to score their third try. A well judged crossfield kick was easily collected by Healy to score as Sharples had left his man unattended.
Sharples left the field with an injury, forcing scrum-half Dan Robson to play on the wing, before Connacht looked to have made the game safe when Carty kicked a penalty in the 78th minute.
However, Gloucester took the contest beyond regulation when Meakes eluded three defenders for the try which Laidlaw converted.
The first period of extra time saw neither side threaten until Hook fired over a magnificent 60-metre penalty with the last kick of the half.
After two minutes of the final period, Healy raced over for his second try, which Carty converted - but G loucester regrouped and when Connacht replacement Dave Heffernan was yellow carded, they took advantage with matchwinning tries from Dawidiuk and a superb length-of-the-field effort from May.