Rouzbeh Cheshmi’s stunning goal in the eighth minute of stoppage time broke Wales’ resistance after goalkeeper Wayne Hennessey had been shown a straight red card for racing off his line and fouling Mehdi Taremi in the 84th minute.
Iran then added their second with practically the last kick of the game when Ramin Rezaeian finished off another rapid counter-attack with a cool finish over substitute goalkeeper Danny Ward.
Wales were seeking a victory in order to boost their hopes of reaching the knockout stages having come from behind to draw 1-1 with USA in their opening game, but they struggled to break Iran down, with Gareth Bale unable to inspire any more heroics.
The result means Rob Page’s side will likely need to beat England in their final Group B game to have any hope of reaching the last 16 while Iran, much-improved from their 6-2 loss to Gareth Southgate’s side, have renewed hope of achieving the feat for the first time in their history.