The 32-year-old finished third on the penultimate time trial stage yesterday, behind victor Tom Dumoulin (Team Sunweb), who pipped Froome by just one second to claim line honours with panache.
The Welshman accelerated away from Froome and Dumoulin to take the stage win - the second of his career in the Tour - and pocket another 20 seconds plus bonuses, while others were even further back.
Thomas will carry a lead of one minute and 51 seconds into Sunday's traditional procession into Paris before the sprinters fight it out for glory on the Champs-Elysees.
Riding for the Barloworld team at the time, Thomas was the youngest cyclist to start that 2007 Tour when it began from London.
To win the Tour, with two prestigious mountain stage wins along the way, Thomas had to shake off his unlucky tag.
Geraint Thomas is all but assured of winning the 2018 Tour de France.
Thomas began the Tour expecting to help four-time victor and teammate Chris Froome bid for a record-equalling fifth victory.
Thomas and Froome have been together since their days on the small Barloworld team a decade ago. "I don't know what's happened to me", Thomas said Saturday, struggling for composure before finally breaking down in tears.
Thomas, who now has another major honour to accompany his pair of Olympic gold medals on his mantlepiece, won the eleventh and twelfth stages in the Alps while continually picking up advantages elsewhere to accumulate a final time of 83 hours, 17 minutes and 13 seconds. I think it's going to take a while to sink in.
But he added: "Tonight, I won't celebrate too much".
The short, steep climb of the Mur-de-Bretagne was the first real test of form for the general classification riders, and Thomas did not falter as he finished ninth, picking up five seconds on Froome who lost the wheels at the end, and 50 seconds on Dumoulin who faded badly on the climb. The last time I cried was when I got married.
Thomas wanted a first Tour crown, Froome a record-equalling fifth, but there was never tension between the two as the road settled a potential dispute.
A former ski jumper who rides for Team Lotto NL-Jumbo, Roglic finished 19 seconds ahead of Thomas, while Romain Bardet of France crossed third with the same time.
He was second after stage nine and took hold of the race leader's yellow jersey on stage 11. "I'm surprising myself on this Tour but we're not in Paris yet".
Dumoulin is a world time trial champion and couldn't afford to be ruled out by Thomas. He's been a massive part of my Tour victories. The Dutchman has won six TTs overall at the three Grand Tours - the Tour, the Giro d'Italia and the Spanish Vuelta.