The farmers' protest occurred 30 kilometres into the 218-kilometre (135.5-mile) leg from Carcassonne to Bagneres-de-Luchon.
Riders, including overall leader Geraint Thomas, were hit as police aimed tear gas and pepper spray at protesters who were blocking the road.
Team Sky's Geraint Thomas now leads by one minute and 39 seconds ahead of team-mate Chris Froome.
Tour de France director Christian Prudhomme condemned the actions of protestors.
The former Tour of Flanders and Liege-Bastogne-Liege victor was helped back up on to the road and given first aid before resuming the stage in the company of a group of frontrunners.
Four-time race champion Chris Froome was also seen putting teardrops in his eyes.
Police were said to be arresting some protesters after farmers threw hay bales across the road before the peloton's arrival.
Gilbert suffered a heavy fall on the descent of the Col de Portet-d'Aspet, where Fabio Casartelli crashed and died during the 1995 Tour.
"One of them things", Yates said after the stage.
Eventual stage victor Julian Alaphilippe (Quick-Step Floors) hotly pursued the Brit, and perhaps the pressure of the descent combined with a dampness on the road forced a tumble.
Alaphilippe took the lead when Adam Yates crashed on a technical descent in the finale.
According to a statement from French authorities in the local Aude department, a small group of 20 activists made the intervention to protest a planned reduction of European Union funding in their area.
"I thought I was broken everywhere", said Gilbert, a teammate of Alaphilippe's on the Quick-Step team. It was the Colombian's first stage win of this year's Tour.
This stage was just 65km long, but featured three towering climbs between Bagneres-de-Luchon and Col de Portet.
Martin came in 28 seconds behind him and Thomas finished third a further 19 seconds back to single himself out as Team Sky's leader.
Francesco Molinari wins British Open as Tiger Woods has impressive rally
Leaders are on the range at the British Open , where they will be greeted by warm breezes in the final round at Carnoustie. Rose is No. 3 and almost joined them until he made an 18-foot birdie putt on the last hole to make the cut on the number.