Riders, including overall leader Geraint Thomas, were hit as police aimed tear gas and pepper spray at protesters who were blocking the road.
Race leader Geraint Thomas, his Sky team-mate Chris Froome, world champion Peter Sagan and Australia's Simon Clarke were among those affected as the race was stopped for 15 minutes.
It was on the same descent that Italian Fabio Casartelli crashed and died in the 1995 Tour de France.
The pair were together as they reached the end of the second decent and were 2 minutes and 30 seconds ahead of the peleton, but after winning Stage 16 the day before, Alaphillipe ran out of legs and was dropped by Kangert entering the final 16-km climb.
The 65km race is the shortest stage in the modern era of the Tour de France and therefore will be similar to a time trial.
Froome sits second in the general classification, 1 minute, 39 seconds behind Sky teammate Thomas.
The race was delayed after farmers threw hay bales onto the road to block the route.
Immediately after the F1-style start riders head straight into the mountains as they make their ascent up the Col de Peyresourde (1,569 metres).
"I knew the finale was tricky", Alaphilippe said.
It was a gift, but Alaphilippe didn't care as he cruised to his second stage win of this year's Tour. "I was sad for (Yates) but it could have happened to me, too, because I took a lot of risks".
"We are not going to lock the riders in a stadium or a tennis court", Tour director Christian Prudhomme said.
According to French media, the small group of farmers from the local Ariege department made the intervention to protest the reduction of European Union funding.
Dutchman Tom Dumoulin occupies third, 11 seconds off Froome.
"It's pure happiness after a day of suffering", said Alaphilippe, who tightened his grip on the polka dot jersey for the mountains classification.
The last time a Tour stage was blocked by a demonstration was in 2004.