Yates, who attacked several times in the stage finale, managed to overtake Dani Navarro on the last curve of the final climb to Saint-Gervais, in the French Alps, just about 50 meters from the finish line.
Navarro finished second, four seconds back, with Romain Bardet completing the podium, nine seconds off the pace.
Thomas suffered in the final kilometer of the grueling 136-kilometer trek featuring three punishing ascents and finished the stage in fifth place, 19 seconds back. The Welsh rider, who had two punctures, retained the leader's jersey with a one-minute lead over Yates overall.
It was Thomas' second World Tour stage race win after he won Paris-Nice in 2016.