The Argentine wizard, who returned last month after a lengthy knee injury, is suffering from renal colic, a problem commonly caused by kidney stones.
"His future availability will depend on the outcome of further medical tests," said a statement on Barcelona's website.
Messi had appeared in good spirits since Barca arrived in Japan on Monday, joking with team-mates and signing autographs for local fans who turned out in their hundreds to watch their idols train.
"Leo is not right," said Barca technical director Robert Fernandez. "It's renal colic and we know what it is, and how painful it is usually.
More From This Section
Brazilian striker Neymar, who has been in a rich vein of form this season, will also miss the game as he recovers from a groin strain suffered in Barca's European Champions League clash at Bayer Leverkusen earlier this month.
Luis Suarez, the third member of Barcelona's vaunted strike-force, starts.
European champions Barcelona are attempting to become the first side to win the Club World Cup three times.