Thomas won by a couple of seconds from Dumoulin, with Bardet one second behind and Froome a further second back.
Though the sight of Sky massed on the front of the peloton most of the day was not one to excite fans, Thomas delivered the stage win with panache.
"Not even in my wildest dreams did I think I would win on here".
Thomas added: "I could see Frosty (Nieve), he's a good mate and it's a shame but I had to go for that win".
"He should have been fighting for victory, " Thomas said of Nibali.
"I saw a massive occasion to take the yellow jersey". We will learn which GC contender is best positioned to wear yellow to Paris, and who is most likely to challenge that leader.
Thomas briefly appeared to lead out Froome but the four-time victor could not take advantage, so Thomas quickly moved back in control.
But the wily BMC rider exceeded expectations, joining an early breakaway that went on to build a healthy lead on the main peloton to stymie whatever plans Sky may have had of taking control of the race.
But the second of three days in the French Alps proved a step too far for the Isle of Man sprinter, who has amassed an impressive 30 stage wins in 10 previous editions.
The 109 km stage from Albertville to La Rosière Espace San Bernardo was the second stage of the tour to take place in the Alps, following yesterday's finish in Le Grand Bornard. "My back hurts. I had trouble breathing and now I don't feel well standing", the Italian said after the stage.
Otherwise, the team's inexorable quality was on full display, from the chase-down of a 40-mile solo breakaway by the Netherlands' Steven Kruijswijk (LottoNL-Jumbo) to the astonishingly poised work done on Alpe d'Huez by 21-year-old Colombian Egan Bernal, who paced Thomas and Froome and covered would-be attackers. They have a really strong team and they are capable of pulling anything back.
And having won the opening stage a year ago to wear yellow for the first time, Welshman Thomas revealed an extra determination to don the famous colour for another day.