Michel Bastos continued his prolific start to the season as Lyon recorded their third win in four games to move top of Ligue 1.
The Brazilian started for the first time this season, having scored as a substitute in his two previous appearances, and was on the spot again after 17 minutes to cancel out Gil's opener.
Bafetimbi Gomis, with a penalty, and Clement Grenier put the hosts 3-1 up and though Gregory Pujol pulled one back, it was Les Gones who took top spot rather than their fellow strong starters.
Alexandre Lacazette had an early chance for Lyon but was denied by keeper Nicolas Penneteau before Valenciennes took an 11th-minute lead.
Gael Danic delivered a corner and Gil met it with a powerful header to beat Remi Vercoutre, the replacement for the departed Hugo Lloris.
Penneteau saved from Mouhamadou Dabo but was at fault as Bastos levelled.
The keeper initially beat Bastos to Grenier's pass but allowed the ball to slip away from his grasp and the winger pounced to finish left-footed.
And it was soon 2-1 as David Ducourtioux fouled Lacazette in the box and Gomis netted a 21st-minute spot-kick.
Pujol almost pulled one back before half-time when his left-foot shot almost beat Vercoutre, but the keeper scrambled back to slap the ball away from goal.
Vincent Aboubakar went close for Valenciennes early in the second half, but shot wide with his left foot.
And Grenier's stunning strike made it 3-1 to Lyon in the 64th minute. Gomis laid Lacazette's cross back into the path of the midfielder, who had spent much of August hankering after a move to Nice but channelled his frustration into a 30-yard left-foot drive which beat Penneteau all ends up.
A Lyon corner saw the ball eventually drop to Gomis, who spectacularly volleyed home but was denied by an errant offside flag.
And it could have proved costly as Pujol's goal left the game in the balance with 15 minutes remaining, the forward getting the crucial touch to Carlos Sanchez's free-kick to deceive Vercoutre.
But there were no further alarms for Remi Garde's side, and they could even have extended their advantage when Steed Malbranque met Bastos' cross but his powerful drive was beaten away by Penneteau.