Two second-half goals gave Iran a 2-0 victory over Wales and left the Welsh's World Cup hopes in tatters.
Wales' resistance was broken by a stunning goal in the eighth minute of added time, which came after Wayne Hennessey had been shown a straight red card for racing off his line and fouling Mehdi Taremi.
Iran's second goal came with practically the last kick of the game, when Ramin Rezaeian finished off a rapid counter- attack with a cool finish over Danny Ward.
Wales were seeking a victory in order to boost their hopes of reaching the knockout stages having come from behind to draw with USA in their opening game, but they struggled to break Iran down, unable to inspire any more.
Rob Page's side will need to beat England in their final Group B game in order to have any hope of reaching the last 16.
Much of the focus was on off-field matters ahead of kick-off, with fans encountered more ticketing problems as they tried to enter the stadium and Iran's national anthem met with loud jeers inside the ground.
The players refused to sing the anthem in solidarity with those protesting for women's rights in the country, but on this occasion they did, even as the crowd voiced their anger.
When the action got under way, it was clear that Iran would be a much more difficult opponent for Wales than it was for England, with the inclusion of star forward Sardar Azmoun, fully fit again, one of six changes to the team.
Kieffer Moore, starting in place of Dan James, poked a close-range shot straight at Hosseini from the cross from which he came.
Within minutes, Iran had the ball in the net at the other end, but the goal was ruled out by the VAR for being out of line.
Page's side lacked the guile and composure to really trouble their opponents and that chance came from Welsh sloppiness in possession.
A tense game exploded into life soon after the break, with Azmoun hitting a shot against the post after getting in behind the Welsh defence, and Gholizadeh's follow-up effort coming back off the other upright.
Page attempted to give Wales fresh impetus with a raft of substitutions, including the introduction of the fit-again Joe Allen, but Iran continued to look more likely.
Ben Davies' powerful attempt from Moore's lay-off was tipped over by Hosseini, but he still had a chance to score.
The 35-year-old was initially shown a yellow card, but the booking was upgraded to a red after a VAR check allowed Iran to ramp up the pressure in the closing stages.
It looked like Wales would hold out for a point, but substitute Cheshmi's strike from 25 yards out broke their hearts.
Their hopes of reaching the last 16 are not over, but a final group game against England, a fixture they must now win, is a daunting challenge.
If you want a more accessible video player, please use the chrome browser.
The captain of Wales said that they were gutted. It is the only way to say it.
It's hard to take, but we have to recover and go again.
We have to get up immediately. We have one game left in the group and have to look at every positive and try to enjoy the moment.
He said that the red card changed the game completely and that he hadn't seen it. We let the first one in and the second one go away.
He has to go again after we recover.
It was a historic game for Bale, his 112th international appearance seeing him overtake Chris Gunter as Wales' most-capped player, but he won't remember it very well.
When his country needed him the most against the USA, Bale delivered, converting the penalty and winning the game for his country.
Bale was limited to 36 touches, the lowest of any player to complete the game, because he couldn't exert his influence.
The performance exposed Wales' dependence on their talisman. When Bale does not spark, neither does his team-mates.
That doesn't mean he should be blamed. The other senior players were also poor, with goalkeeper Wayne Hennessey punished for the mistake that led to his red card, and the other senior players being poor as well.
The spotlight goes to Bale. If Wales beat England and make it to the knockout stages, they will need more from him, but they must find other solutions and a new generation that can build on the progress he has made.
If you want a more accessible video player, please use the chrome browser.
The performance before the red card was not good.
We were not close to the levels we've set and the standards we've set in recent games.
There is only one outcome when there are so many off days.
The sending off didn't help but we couldn't get a defensive shape because we had five forwards on the pitch.
I will always take responsibility for the performance. The changing room is difficult at the moment but we will be ready for the England game.
CarlosQueiroz said two points. The profile of our team is amazing. There is a sense of unity. We need to return to route after the first game.
The second point was to stop the bleeding. There are different moments in football. It isn't because you won or lost.
In our first game we were bleeding in our pride.
This was a chance to get back on track. To stop the bleeding, we put a bandage on.
We played well and were deserving of the victory.
If you want a more accessible video player, please use the chrome browser.
Wales must beat England on Tuesday in order to have a chance of progressing to the last 16.
Iran is in a strong position to advance to the knockout stages after moving to three points and playing the USA at 7pm on Tuesday.
The right-back is going to keep his place in the team even though he was an unused substitute in the England game.
Rezaeian was an energetic presence throughout, helping to keep Bale quiet at one end and taking his chance brilliantly for Iran's second goal at the other