Younes Belhanda's goal in the closing stages inflicted a first Ligue 1 defeat in almost four months on table-topping Lille.
Montpellier were good value for their 1-0 win and had a shout for a penalty in the first half as Mapou Yanga-Mbiwa went down under Franck Beria's challenge.
Lille were reprieved on that occasion but the breakthrough came seven minutes from time as Belhanda sealed a win which lifts Montpellier within five points of the European places.
Both Rennes and Paris St Germain took advantage of Lille's slip to put pressure on the leaders with wins of their own.
Victor Hugo Montano's late penalty earned Rennes a 2-1 victory over Toulouse that sends them back to second.
Montano scored from the spot with two minutes left to win a game Rennes had led at half-time through a Yann M'Vila effort before an own goal from Kevin Theophile-Catherine levelled matters just after the hour mark.
However, Rennes were fortunate after Toulouse hit the frame of the goal three times.
Paris St Germain breezed past Nice 3-0 at the Municipal du Ray.
Ludovic Giuly, Guillaume Hoarau and Sylvain Armand scored to move PSG four points behind Lille.
Nice, who now sit only two points above the drop zone, had their misery compounded by a late red card for Drissa Diakite.