Argentina arrived in Qatar on a 36-match unbeaten streak and appeared to be on their way to a straightforward victory after Messi stroked home an early penalty.
Lionel Scaloni’s Copa America champions could have put the game beyond Saudi Arabia’s reach in the first half but had three goals chalked off for offside.
Saudi Arabia, ranked a lowly 51st in the world, equalised early in the second half through Saleh Al-Shehri, silencing the hordes of Argentina fans.
And just minutes later the Green Falcons were in front when Salem Al-Dawsari rifled an unstoppable shot into the top corner after a delightful piece of trickery.
Argentina, who last failed to reach the knockout phase in 2002, will be dumped out as early as Saturday if they lose their second match to Mexico.
“It’s a very heavy blow, a defeat that hurts, but we must continue to have confidence in ourselves,” said Messi, who has never won the World Cup.
“This group is not going to give up.”
Saudi’s French coach Herve Renard said the “stars were aligned” for his team.
“We made history for football,” he added. “It will stay forever, this is most important.
“But we also have to think about looking forward. We still have two difficult games before us.”
Defeat was a bitter setback for Argentina, who were one game away from equalling Italy’s all-time record of 37 matches unbeaten and came to this World Cup as one of the favourites.
Scaloni insisted his team had not taken their opponents lightly.
“What comes ahead is to rise up, to face Mexico,” he said. “They will be tough, as everyone is at the World Cup. Now we need to win two games to move on.”
Holders France put their injury woes behind them by coming from a goal down to see off Australia 4-1.
Craig Goodwin gave the Socceroos hope of grabbing the second shock win of the day with a ninth-minute opener, but France were ahead before half-time through goals from Adrien Rabiot and Olivier Giroud.
Kylian Mbappe, the breakout star of France’s 2018 triumph in Russia, headed home a third midway through the second period.
Giroud was starting in place of Karim Benzema after the Ballon d’Or winner joined Paul Pogba, N’Golo Kante and Presnel Kimpembe in being ruled out of the tournament through injury.
The 36-year-old completed a double with 19 minutes remaining to draw level with Thierry Henry at the top of his country’s all-time scoring charts on 51 goals.
Denmark drew 0-0 with Tunisia in the other match in the group, with talisman Christian Eriksen appearing in his first match in a major tournament since suffering a cardiac arrest during the European Championship last year.
Poland played out a goalless draw with Mexico in the other game in Argentina’s Group C, with Robert Lewandowski missing a second-half penalty.
The Barcelona striker was denied a maiden World Cup goal when his 58thminute spot-kick was saved by veteran goalkeeper Guillermo Ochoa.
Ronaldo’s Manchester exit
Saudi Arabia’s dramatic win shifted the focus - for a time, at least - to the action on the pitch, but Messi’s great rival Cristiano Ronaldo was soon making the headlines again.
Manchester United said that the 37-year-old forward, currently with the Portugal squad in Qatar, will leave the club with immediate effect following last week’s incendiary television interview.
Ronaldo had said he felt “betrayed” by the club and had no respect for manager Erik ten Hag.
Back in Qatar, Belgium’s Jan Vertonghen said he was “afraid” to talk about human rights after European nations decided not to wear a rainbow-themed captain’s armband.
Seven countries, including England and Germany, abandoned plans to wear the armbands at the World Cup because of the threat of FIFA disciplinary action, including bookings.
They had been viewed as a symbolic protest against laws in the host nation, where homosexuality is illegal.
“I’m afraid if I say something about this I might not be able to play tomorrow,” the defender said.
“It’s an experience I’ve never felt in football before. I feel controlled.
“I’m afraid to even say something about this.”
- Don’t forget to pick up your copy of this week’s The Phuket News (Nov 18) to get your World Cup 2022 Wall Chart -