The Mitchelton-Scott rider powered away in the final ascent, a 16.3-km stretch at an average gradient of 6.2 percent, and dropped all his rivals to beat Dylan Theuns (BMC) and Jon Izagirre (Bahrain-Merida) by eight seconds.
Overall, the 25-year-old now leads the Ion Izagirre by 11 seconds with Bahrain-Merida team-mate and brother Gorka Izagirre by 12 seconds.
"I always was in a great position," Yates said. "We avoided being in a split or anywhere. A lot of guys lost energy in those splits. We really saved energy there and it gave me a biota an extra in the finale.
"In the beginning of the climb, Astana were riding at a good pace. We had to be patient. At one moment, me and [team-mate] Roman Kreuziger decided it was the moment to squeeze the race a bit and we went. I attacked from there and as we saw I had good legs."
Team Sky's Sergio Henao was 46 seconds behind and Jakob Fuglsang of Astana 48, while overnight leader Luis Leon Sanchez, also with Astana, ran out of gas six kilometres from home.
Sunday's final stage is a tough mountainous 110km ride around Nice.
"The Izagirre brothers are very strong, it's always very difficult to know how they're feeling," Yates said. "They show no emotion. And Tim Wellens is a great rider of course.
"It's going to be a tough day but we have a great team. We saw the last few years that the GC has come down to one second or two. I expect the same tomorrow. But we have a great team and I can go in the stage with confidence."The race got started on the slopes of the Cat 2 Cote de Gattieres with a break including Thomas De Gendt (Lotto Soudal) and Australian Rory Sutherland (UAE Team Emirates).
Thomas De Gendt leads the break. Source: Getty
With two minutes on the peloton, De Gendt set about taking the mountain classification away from Fabien Grellier (Direct Energie) amassing points on the Cote de Gattieres, Cote de la Sainte-Baume, Col Saint Raphael and Cote de Villars-du-Var.
While De Gendt was busy claiming the Polka Dot jersey, the peloton split on the Col Saint-Raphael leaving defending champion Sergio Henao (Sky) and Tim Wellens (lotto Soudal) adrift before a regrouping on the Cote Villars-du-Var, but it was with 15km to go when the race began to break up.
Esteban Chaves (Mitchelton-Scott) was dropped while white jersey holder Marc Soler (Movistar) struggled at the back of the pack. With 13km to go, Tony Gallopin (AG2R) who had earlier taken the stage lead, was reined in by a peloton led by Bahrain-Merida's Antonio Nibali and Astana's Omar Fraile.
General classification leader Luis Leon Sanchez's Astana team-mates set a steady pace to protect his yellow jersey but that lasted only to 6km from the finish when Roman Kreuziger (Mitchelton-Scott) upped the tempo which dropped him.
Four kilometres from the line, Yates moved swiftly, taking Ion Izagirre (Bahrain-Merida) with him. The two built a maximum lead of 18 seconds as their rivals like Julian Alaphilippe (Quick-Step Floors) cracked.
Yates lifted with 1.4 km to go and drop Izagirre before powering his way towards the stage victory and the yellow jersey.