Bath had looked set for victory as two tries from lock Ryan Caldwell helped put them 22-17 ahead going into the final minute, but Montpellier snatched their first-ever Heineken Cup win when Timoci Nagusa went over for a score that was converted by Martin Bustos Moyano.
The result leaves Bath bottom of Pool Three on seven points, with Montpellier moving into second spot, level on 10 points with Glasgow but having played a game extra. Leinster lead the way on 16 points ahead of their meeting with Glasgow tomorrow.
It was Montpellier who were quickest out of the blocks at the Stade Yves du Manoir as they crossed for a try inside the opening minute through wing Pierre Berard.
Benoit Paillaugue added the extra points to make it 7-0 but Bath battled back from that early setback to take a 10-7 lead at the interval, Olly Barkley reducing the deficit with a penalty before then converting Caldwell's first try on the stroke of half-time.
A Paillaugue penalty levelled the scores up five minutes into the second half but Bath were back in front soon after when Caldwell went over for his second score, Tom Heathcote adding the extra points this time.
Bath's advantage lasted barely eight minutes before Montpellier made it 17-17 through a converted Alex Tulou score, but the Aviva Premiership side were soon back in the ascendancy as England international Matt Banahan scored their third try of the match in the 71st minute.
Heathcote was unable to add the extra points though, and that meant the French side, playing in only their second Heineken Cup campaign, knew a late converted try could still win them the match - and that is exactly what happened thanks to Nagusa and replacement Moyano.
Gilbert has released a new line of rugby cleats. The Gilbert Virtuo 8S is part of the exciting new product. Check it out.
The entire All Blacks apparel line has been updated for 2013/14. Check out the New Zealand All Blacks polo.
The Nike Tiempo is a solid rugby cleat and one of few styles still made from full-grain natural leather.
The Gilbert Blitz 8S rugby cleat is a great cleat at a great price of $69.99. Get a new pair of cleats today.
A cool looking all black rugby cleat with the high performance adidas is known for. Get in the Gear!
Wear the crest of the British and Irish Lions on your t-shirt. A great look for the summer.
$29.99
The All Blacks Performance t-shirt is black with hints of blue from the training jersey. Very Cool.
The New Zealand All Blacks training jersey for 2013/14. Get in the Gear!
The USA Rugby Pro Alternate rugby jersey is perfect for any fan of the Eagles. Get yours to wear during the summer Test matches.
The NEW All Blacks 2013/14 jersey has arrived at World Rugby Shop. Dare to wear the colors of the All Blacks.