Pierre-Alain Frau's double enabled Lille to come from behind and record a victory which moves them out of the Ligue 1 relegation zone.
Lille's first away success of the season moved them above Laurent Guyot's side, who had twice led Les Dogues.
After an uninspiring opening, the home side were rescued by the crossbar in the 21st minute when Stephane Dumont's shot beat goalkeeper Mathieu Valverde but crashed back off the woodwork.
Boulogne took the lead in the 33th minute when Laurent Agouazi's cross found Bira Dembele, who headed past goalkeeper Ludovic Butelle. The visitors claimed Dumont was fouled in the build-up to the goal - but their pleas were ignored.
Lille were level four minutes before half-time when Frau played a one-two with Dumont and shot at goal. The effort was saved by Valverde but the rebound was headed into the empty net by Gervinho.
However, after Boulogne's Damien Marcq had forced Butelle into a good save, the hosts regained their lead from the resulting corner just before half-time when Agouazi's cross was headed into the corner by Jeremy Blayac at the far post.
Six minutes into the second half Lille were level for the second time, when Frau was given a simple chance to finish after excellent play by Gervinho.
And the Ivory Coast international striker was involved again in the 56th minute, when Rudi Garcia's side took the lead for the first time.
Gervinho showed good skills on the right and crossed for Dumont, whose effort came back off a post and fell kindly for Frau, who helped himself to a second goal with a sidefooted finish.
Anthony Lecointe crossed for Blayac in the 69th minute but his effort was too high, then six minutes later home appeals for a penalty for a handball by Franck Beria were rejected.
Blayac sliced an 85th-minute shot horribly wide and Dembele was denied a penalty in the fading seconds after Franck Beria appeared to foul him, as Lille held on to extend their unbeaten run to four matches.