Referee Gil Manzano said in his match report that Messi hit his opponent with "excessive force" while the ball was not near him.
After stunning Real Madrid in semis, Athletic Bilbao beat Barcelona 3-2 in Spanish Super Cup final, Messi gets red
It was the first-ever red card for Messi in 753 appearances for Barcelona, to go with his two reds for Argentina in 2005 and 2019.
Real Madrid will also be without Ronaldo for La Liga matches at home to Valencia and Levante and away at Real Sociedad.
Barca have been heavily linked with moves for Liverpool's Philippe Coutinho and Ousmane Dembele of Borussia Dortmund.
Ronaldo scored and was sent off as Real Madrid beat a Barcelona side by winning 3-1 in the first leg of the Super Cup.
Zidane has confirmed on Saturday that he will sign a contract extension with the team he has guided to back-to-back Champions League titles.