Thomas finished 12th in Strade Bianche last week and had looked in good shape during the first three stages of the race. His team opted not to comment until after the conclusion of the stage.
The withdrawal of the Tour de France winner leaves Wout Poels as Sky's strongest challenger in the race, back in ninth and 47 seconds behind overall leader Adam Yates.
Speculation was rife about the reasons for Thomas' decision to step off the bike, with some jokingly suggesting he might be doing so in order to watch the rugby!
But Sky confirmed on Saturday evening that Thomas withdrew due to stomach problems.
“I’ve been struggling with stomach issues for a couple of days now," the Welshman told Team Sky's official website. "I wanted to start this morning but I knew as soon as we hit the first climb that I wasn’t right.
“I could have battled through but it wouldn’t have done me any favours. We agreed on the road that it was better I stop and rest up. I’ll head home, have a couple of easy days, and then get back into training early next week.”