Chris Froome came home third to stretch his overall lead to 27 seconds as Rigoberto Uran moved up to second and Fabio Aru dropped to fourth, with Romain Bardetremaining third.
Slovenia’s Roglic, 27, was junior world ski-jumping champion in 2007 but became a professional cyclist in 2014.
He was part of an initial 33-man breakaway that was whittled down to just six riders when Roglic attacked solo 6.4km from the summit of the hors category Col du Galibier, which at more than 2,600 metres above sea level was the highest point of this year’s Tour.
He crested the climb, 28km from the finish in Serre-Chevalier, with a lead of just over a minute and half on a group of chasers including the top contenders.
On the descent, Roglic easily managed his lead while a five-man chase group developed, including Froome.
But Italian Aru, who started the day second at 18sec, had been dropped by an acceleration from Bardet just before the Galibier summit and he was chasing desperately to limit his losses.
Uran took second, 1min 13sec behind Roglic, to snatch six bonus seconds that moved him up to second, on the same time as Bardet.
Froome also took four bonus seconds for finishing third to help increase his lead.
Aru came 31sec later to drop to fourth at 53sec ahead of Thursday’s second straight Alpine stage with its brutal finish at the summit of the imposing Col d’Izoard.