The 32-year-old beat Dutchman Tom Dumoulin by 1 minute 51 seconds, with holder Chris Froome coming third.
Thomas is the third Team Sky winner in the past seven years. Before Froome's successes in 2013, 2015, 2016 and 2017, Bradley Wiggins was champion in 2012.
"When I rode on the Champs-Elysees for the first time in 2007, that was insane - just to finish the race and just to be a part of it," Thomas told British broadcaster ITV. "To now be riding round winning it is just incredible.
"It is just a whirlwind. I seem to be floating around on cloud nine.
"Maybe when I am 70, sat in a corner of a pub telling some 18-year-old what I used to be, it will sink in. It is incredible - the stuff of dreams."
Although Thomas' victory has given Sky chief Dave Brailsford a potential selection dilemma next year, he was full of praise for his new title holder.
"He is very loyal, there are never any doubts with him. Now he is being repaid for all of the years of hard work and sacrifice he made for the team. The guys in the team are happy, so happy to work for him."
Thomas first rode in the Tour in 2007, when he came 140th out of 141 finishers. And his sacrifice in helping Froome win four editions has meant that Thomas' best finish before this year was 15th.
Mark Cavendish, a former Team Sky colleague of Thomas, said he was full of pride.
"If they [Team Sky] had said to Geraint: 'Right, now you have got to work for Froome' he would have done it as that is the kind of guy he is. That is what is special about him and why he deserves the win.