A thrilling game saw Marseille go in front through Andre Ayew, before Emmanuel Herrera drew the visitors level.
John Utaka then put La Pallaide ahead, before Jordan Ayew equalised, and then Gignac scored late on to take the south coast club above arch rivals Paris St Germain.