Iran, the second-highest ranked AFC side in the FIFA standings, needed only a point to join Japan in qualifying for the finals in the United States, Canada and Mexico.
Iran will, however, head to North America with relations strained as US President Donald Trump takes a hard line over opening new nuclear talks with Tehran.
The Group A leaders were made to work hard at the Azadi Stadium by upward-trending Uzbekistan, with Mehdi Taremi scoring seven minutes from time - his second of the match - to seal the point.
"We have to thank the fans who filled the stadium today, and thank God they did not leave empty-handed," said Iran captain Alireza Jahanbakhsh.
Seeking to qualify for a first World Cup, Uzbekistan opened the scoring on 16 minutes through Khojimat Erkinov, before Inter Milan striker Taremi scored his first of the night shortly after half time.
Parity lasted only one minute, with Abbosbek Fayzullaev restoring Uzbekistan's lead.
Again, Taremi was the man to pull his team back into the game and ultimately book a spot in North America, when he finished past goalkeeper Utkir Yusupov late on.
Iran will be appearing at a fourth successive World Cup and seventh in all.
Taremi expressed his "happiness" with the result but admitted his team had "tactical problems" after conceding twice.
Uzbekistan remain on course for an inaugural appearance at the finals.
Sitting second on 17 points, they require a win from the concluding double-header in June either away to third-placed UAE or at home to Qatar, in fourth.
The UAE climbed to four points behind Uzbekistan following their 2-1 victory in injury time against North Korea in Riyadh, with Qatar three points further back after their 3-1 defeat to Kyrgyzstan in Bishkek.
The top two go straight to the World Cup, with teams finishing third and fourth in the three Asian groups entering a further round of qualifying.