Nemani Nadolo powered over for a score that was confirmed by the video referee in the 79th minute and Ruan Pienaar held his nerve to split the posts for a match-clinching conversion.
Montpellier return to the top of the table as a result, but Clermont remain well adrift of the top six having again failed to transfer their European Champions Cup form to the domestic league.
A spectacular finish from Mali Hingano had looked set to earn last year's Top 14 winners and Champions Cup runners-up victory on Sunday, the replacement diving over a pile of bodies for his side's second try.
Greig Laidlaw converted both and also added five penalties, but Montpellier – who had crossed twice in the first half through Louis Picamoles – stole victory after piling on the pressure late on.
Nos Cistes s'imposent à Clermont sur le score de 29 - 30. Bravo à eux! pic.twitter.com/grNBxh4LG3
— Montpellier Rugby (@MHR_officiel) January 28, 2018
Struggling Stade Francais suffered a 40-5 thrashing at home to Pau in Greg Cooper's final game in charge of the capital club.
It was announced earlier this month that Cooper would return to New Zealand for personal reasons, the former All Black subsequently citing his daughter's ill health.
"Mentally, we were not there," said Stade skipper Sergio Parisse. "It's our responsibility. We do not look for an excuse."
— Stade Français Paris (@SFParisRugby) January 28, 2018
Photo Getty Images. Caption: Montpellier's Nemani Nadolo