A late goal by substitute Geoffrey Dernis gave the Northerners a sixth successive league win.
They are level on 22 points with Olympique Lyon, who they trail on goal difference after the champions' 4-0 demolition of promoted Caen on Friday.
Lille had opened the scoring in the fourth minute thanks to Mathieu Bodmer before Chaouki ben Saada scored Bastia's equaliser in the 22nd minute.
"It was a hard-fought victory because Bastia played a great game." said Lille coach Claude Puel.
"It's a great satisfaction to have taken three points in such difficult circumstances, against great opponents and after a two-week break.
"It's great to win when everything was far from perfect."
Paris St Germain's woes continued as they lost 1-0 in Nantes to a last-minute Nicolas Savinaud penalty after a foul by Jose Pierre-Fanfan.
It was PSG's fourth defeat of the season and hardly a morale booster ahead of Wednesday's Champions League clash with European champions Porto at the Parc des Princes.
EMPHATIC VICTORY
AJ Auxerre moved above Monaco into third place with an emphatic 3-0 victory against RC Lens.
Swiss Stephane Grichting, Zimbabwe's Benjani and midfielder Philippe Violeau scored Auxerre's goals.
Monaco almost bounced back with a win after their shock 4-3 home defeat to Nice as they led for most of the game at Metz before an 83rd minute equaliser by Senegal's Babacar Gueye.
Togo's Emmanuel Adebayor had opened the scoring for Monaco against the run of play in the 55th minute.
Two Brazilian strikers stole the show on Saturday evening.
AC Ajaccio's Lucas scored twice as the Corsicans were held to a 2-2 draw by Racing Strasbourg and he is now the leading Ligue 1 goalscorer with six goals, while Araujo Ilan grabbed a hat-trick as mid-table Sochaux humbled Stade Rennes 3-0.
The top game of the weekend is on Sunday when Olympique Marseille host St Etienne in a match between two of the most popular teams in France at a packed Stade Velodrome.
More from rediff