|Gloucester (19) 22|
|Try: Purdy Con: Laidlaw Pens: Laidlaw 5|
|Bordeaux-Begles (13) 23|
|Tries: Talebula 2 Cons: Bernard 2 Pens: Bernard 2|
Pierre Bernard's late drop goal denied Gloucester a spot in the European Champions Cup as Bordeaux-Begles won their qualification play-off.
Henry Purdy's try and four Greig Laidlaw penalties gave the hosts the lead, before Bordeaux retaliated through Metuisela Talebula's brace.
Laidlaw's late penalty looked to be enough for Gloucester.
But the French side will be in Europe's elite competition next season after Bernard's intervention before the end.
It was a heartbreaking finish to the season for Gloucester, who earned a place in the fixture by winning the Challenge Cup and then beating Connacht last week.
They looked to have a command of the game for long periods, with Purdy collecting James Hook's kick and just about staying in play before touching down.
And with Laidlaw looking in composed form with the boot, the English side were comfortable at 19-3 up.
But the Cherry and Whites, playing at Sixways because of a clash with a Madness concert at Kingsholm, relinquished possession deep in Bordeaux territory to allow Talebula to run 75 metres and score before the break.
The Fijian scored 10 tries in the Top 14 this season and the wing received the ball from Julien Rey to finish a flowing second-half move and put Bordeaux in front for the first time.
Laidlaw kicked Gloucester back in front with 10 minutes to go, only for fly-half Bernard to fire through the posts with the final touch of the game.
It means the Premiership club will play in the Challenge Cup next season.
Gloucester: Cook; Sharples, Meakes, Twelvetrees (capt), May; Hook, Laidlaw; Wood, Hibbard, Afoa; Savage, Palmer; Kalamafoni, Rowan, Moriarty.
Replacements: Dawidiuk, Thomas, Knight, Stooke, Thomas, Braley, Burns, Purdy.
Bordeaux-Begles: Beauxis; Talebula, Le Bourhis, Rey, Connor; Bernard, Adams; Poirot, Avei, Toetu; Marais, Botha; Madaule, Chalmers, Saili.
Replacements: Maynadier, Poux, Gomez Kodela, Jaulhac, Clarkin, Lesgourgues, Spence, Serin.
Referee: Leighton Hodges (WRU).