The two sides had played out a goalless draw in the first leg of this qualifying play-off meaning Bahrain needed to score to have a chance of progressing.
Things looked bad for Bahrain when Saudi Arabia took the lead in the 12th minute through Nasser Al Shamrani but Bahrain equalised five minutes before the break through Jaycee John.
It looked as though the visitors would hold firm for the draw that would be enough to send them through on away goals but Hamad Al-Montashari struck in injury time to seemingly secure the win for Saudi Arabia.
But Ismail Abdullatif immediately replied to secure a 2-2 draw that ensures Bahrain will tackle New Zealand in another play-off for a place at next year's World Cup.
"It was a tough match as we faced one of the strongest team in the region and we played this crucial match in front of Saudi fans," said Bahrain coach Milan Macala.
"I talked to my players before the game and advised them not to look for goals as I expected the Saudis to attack looking to take the lead.
"We were lucky to score in the last minute but we really deserve to reach the World Cup finals.
"Now we will start thinking about preparing for our next game and I hope to see Bahrain in the World Cup finals."
Saudi Arabia coach Jose Peseiro, meanwhile, felt his side needed to be more clinical in front of goal.
"We failed to make the most of many scoring chances in the first half," he said. "We could have scored three goals at least.
"I always ask my players to slow down and not to hurry to score goals. They pressed forward but I think we were not lucky.
"I think my players did the role I asked of them and the defeat is my responsibility."