Teuns, riding for Bahrain-Merida, crossed the line ahead of Trek–Segafredo's Ciccone by a handful of seconds after a brutal 7km ascent with an average gradient of 8.7 percent, finishing on gravel.
Belgian Xandro Meurisse took third place.
Defending champion Geraint Thomas was the strongest of the overall contenders on the 160-km route from Mulhouse to La Planche des Belles Filles. He took fourth place, two seconds ahead of fifth-placed Thibaut Pinot of France.
Thomas broke from the main contenders in the final stages of the ultra-tough stage which was as expected decided on the last of seven climbs, with the Welshman gaining a few seconds over most of his rivals.
Pinot, who grew up 30 kilometres from the summit finish, was right on Thomas's tail, losing just a couple of seconds to the champion.
Three of the overall contenders though lost significant time as 2014 champion Vincenzo Nibali, Jumbo Visma captain Steven Kruijswijk and, to a greater extent, France's Romain Bardet suffered on the slopes.
Fresh shoulders in yellow
French rider Julian Alaphilippe did everything he could to hold onto the leader's yellow jersey for a fourth day. He battled hard up the ascent, trying to hold onto Teuns and Ciccone through their clouds of dust on the gravel.
But the home hero fell just six seconds short – enough to lose the race lead he first took on Stage 3.
The severity of the climb turned out to be a revealing gauge of the fitness of some of the top Tour contenders who will battle for the race lead on even tougher climbs to come in the Alps and Pyrenees.
(with AFP, Reuters)