Leinster's Heineken Cup hopes were left hanging by a thread as Bourgoin avenged last weekend's defeat in Dublin.
HEINEKEN CUP POOL FIVE
Bourgoin (17) 30
Tries: Janin, Peyron, Venditti
Con: Peclier (3)
Pen: Peclier (2)
Leinster (13) 28
Tries: D'Arcy, Contepomi, Kearney
Pen: Contepomi (3)
Cons: Kearney, Contepomi
A late penalty by Alexandre Peclier settled the issue after Leinster had come back from 14 points down to lead.
David Janin and Pascal Peyron scored first-half tries for Bourgoin while Gordon D'Arcy notched a Leinster try.
David Venditti's scored Bourgoin's third try but touchdowns from Contepomi and Robert Kearney put Leinster ahead before Peclier's decisive penalty.
Bourgoin started well and were only denied a try in the fourth minute when referee Tony Spreadbury ruled the ball had not been grounded after a dynamic drive by the pack had put Leinster on the backfoot.
But the French club could not be denied four minutes later when winger David Janin gathered to touch down after his own chip over Girvan Dempsey. Alexandre Peclier added the extras to increase Bourgoin's lead to 7-0.
Leinster gradually came into the game and Felipe Contepomi opened their account with a 20th-minute penalty.
But Bourgoin immediately hit back with Benjamin Boyet slotting a glorious drop-goal from almost 50 metres out.
On the half-hour, Contepomi and Bourgoin full-back Peclier were sent to the sin-bin after trading blows following a Leinster attack instigated by the Argentine. It was one of a number of first-half skirmishes with both sides clearly fired up.
Leinster levelled the match in the 39th minute with Gordon D'Arcy jinking his way through some weak tackling for a try. Kearney converted to level the scores.
Gordon D'Arcy scored Leinster first half try
A Contepomi penalty then put Leinster 13-10 ahead but, with the half-time whistle imminent, Bourgoin prop Pascal Peyron charged over the Irish side's line for a try which Peclier converted.
Leinster endured a dreadful six minutes after the break with Eric Miller's blatant hand in the ruck earning him a sin-binning and gifting three more points to Peclier.
And almost straight after the restart, David Venditti intercepted Contepomi's pass and ran 60 yards for Bourgoin's second try under the posts.
Contepomi then gave Leinster some hope by notching a fine try in the 52nd minute but he missed the conversion to leave his side still 27-18 behind.
However, within two minutes, Leinster had reduced the deficit to only two points. Robert Kearney finished off an overlap to get the try and Contepomi converted from near the left touchline.
On the hour, Leinster regained the lead with Contepomi's long-range penalty just getting the distance.
It looked likely to be enough for Leinster but Bourgoin forced a penalty in the first minute of injury-time and Peclier held his nerve to slot the kick.
Leinster won a penalty in their own half in the final seconds but Contepomi's effort - from around 60 metres - did not get have the legs.
Leinster coach Michael Cheika
"Since losing to Bath in October, we've targeted five wins. After this setback, it's down to four but at least we still have a chance of qualifying and that means beating Glasgow (at home) and Bath away.
"It will be a tough ask, but I've seen enough in this side to know that it's
achievable. Having Brian (O'Driscoll) back fit will be a boost."
Bourgoin coach Christophe Urios
"It was very important for our season to win today. You saw how much it meant to the fans.
"The players were very down after losing by so much (53-7) to Leinster last week so this has certainly
lifted their spirits."
Bourgoin: A Peclier; A Forest, D Venditti, JF Coux, D Janin; B Boyet, M Forest, capt; O Milloud, B Cabello, P Peyron; J Pierre, P Pape; J Frier, A Petrilli, W Jooste.
Replacements: G Davis for Venditt 77, C Del-Fava for Pape 51. Not used: P Cardinalli, F Montagnat, L Baluc Rittner, M Campeggia, N Carmona.
Sin Bin: Peclier 32, Coux 48
Leinster: G Dempsey; K Lewis, G D'Arcy, S Horgan, R Kearney; F Contepomi, G Easterby; R Corrigan, B Blaney, W Green; M O'Kelly, B Williams; E Miller, K Gleeson, J Heaslip
Replacements: E Byrne for Corrigan 64, C Jowitt for Miller 63. Not used: O'Riordan, Hickey, Hepworth, Gissing, D Blaney.
Sin Bin: Contepomi 32, Miller 42
Referee: Tony Spreadbury (RFU)