The Colombian started Wednesday four minutes, 23 seconds behind Thomas, so he was allowed to go by the general classification group when he attacked up the last of the three climbs on the 65-kilometre run from Luchon to Saint-Lary-Soulan.
He dropped Rafal Majka with 6.5 kilometres to go and then managed to hold off Dan Martin's valiant attempt to take the stage win.
In the GC group, Thomas rode away from Sunweb's Tom Dumoulin and LottoNL–Jumbo's Primoz Roglic in the final few metres to take third in the stage.
Chris Froome was dropped by the trio further back and lost his second place to Dumoulin on a tough day for the defending champion.
Here are the stage results, along with the latest GC standings:
The novel Formula One-style grid start for the short stage had little impact. "Pole-sitter" Thomas settled back into the peloton with Froome, the rest of Team Sky and the other GC riders, while others launched an early attack up the Col de Peyresourde.
Astana's Tanel Kangert hit the lead pack on his own and was able to go over the Montee du Peyragudes without any company to take the King of the Mountains points, before being joined on the descent by Julian Alaphilippe and Kristijan Durasek.
Kangert was on his own again at the front early in the monstrous final ascent of the Col du Portet, but he was caught and passed with 8.5 kilometres to go by Quintana and Majka.
Quintana then dropped the Bora-Hansgrohe rider and, despite Martin's best efforts, crested the finish on his own to take a first stage win in five years.
A little further back, Thomas, Froome, Dumoulin and Roglic—the top four in the GC—were together in the third group with two kilometres to go after a handful of failed attacks up the Portet.
Sensing weakness from Froome, Dutchman Dumoulin took one final swing. It proved a knockout blow, as only Thomas, Roglic and Steven Kruijswijk could go with him.
Froome, the current holder of all three Grand Tours, was left clinging on to team-mate Egan Bernal's back wheel.
It was simply a case of damage limitation for the defending champion, while ahead Thomas exploded up the final few metres to increase his lead in the yellow jersey to 1:59 over Dumoulin.
There have been many questions during Thomas' lengthy stay in yellow as to whether he or Froome looks better equipped to win the 2018 Tour.
Those questions were answered on Wednesday as, with just four stages to go, the Welshman has a comfortable lead at the top of the GC standings and looks the best rider in the race.