Cheshmi's strike from outside the box was just beyond the diving reach of Wales backup goalkeeper Danny Ward, who was pressed into duty when starter Wayne Hennessey was sent off in the 86th minute.
Ramin Rezaeian added a second goal moments later and Iran wildly celebrated while some of the Welsh players dropped in disbelief to the field.
Hennessy was ejected in the 86th minute for a high challenge on Mehdi Taremi.
Gareth Bale made his 110th appearance for Wales, the most all-time for the national team, but the Welsh appeared sluggish early after a 1-1 draw with the United States in their Group B opener.
The match was played after pro-government fans harassed anti-government fans outside the stadium in Qatar, reflecting the divisions afflicting the country.
Check the 2022 World Cup schedule and groups standings.
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO_Sports and on Facebook at AhramOnlineSports.)