Thomas sat at the head of the action when the race reached its critical point at 1.5 kilometres out. He shifted to his big ring and his chain became stuck.
"I can't believe it," Thomas said.
He stopped over the line at the top of the 11.75-kilometre climb, 1335 metres up in central Italy's snow-covered mountains.
"It just came off and it got stuck. I was yanking it to try to get it out and it wouldn't come out and neutral service couldn't do it either. I don't know how it happened, just one of those things."
A curse appears to be over Thomas in the week-long stage race from Tuscany to Marche. Last year, in the first day's team time trial he lost around one minute and 30 seconds when Gianni Moscon suffered a wheel failure. It appeared the crucial moment as he finished an eventual fifth overall at 58 seconds.
Reminded of those problems and now this year's mechanical issue, he said, "I guess that's bike racing , but it's frustrating at the moment."
Former Sky team-mate Mikel Landa (Movistar) won the stage from an attack. Thomas tried to limit his losses, but slipped to fifth at 26 seconds behind leader Damiano Caruso (BMC Racing). Sky's Michal Kwiatkowski sits in second at one second.
After Thomas suffered his mechanical problem and got going again, he benefitted from the work of team-mate Chris Froome, who helped pace him to the finish.
"Geraint didn't lose everything, he's in good form and we can try again tomorrow and then there's the TT in the last day," said Froome. "The race is not yet over for us."
Froome, who is aiming for the Giro d'Italia in May, surprised those watching the race when he lost ground at 2.5 kilometres to go. He finished 1-04 behind the leaders.
"I feel all right pretty much in this first big test," Froome said. "I'm not up, up there, but I know that there's work to do before the Giro and I'm content more or less with my condition. It's ok, we are in March."
Thank you for reading 20 articles this month* Join now for unlimited access
Enjoy your first month for just £1 / $1 / €1
*Read 5 free articles per month without a subscription
Join now for unlimited access
Try first month for just £1 / $1 / €1