The match finished 1-1 after the regulation 90 minutes, with neither side securing an advantage during extra time, before Iraq snatched victory from the hosts from the penalty spot.
Goalkeeper Noor Sabri proved the hero for Iraq, not only saving two shots during the shoot-out but also converting the winning spot kick to spark wild celebrations among the large expatriate crowd at the National Stadium in Riffa.
Sabri saved penalties from Bahrain captain Mohammed Hussain and Abdulwahab al-Malood while Bahrain goalkeeper Sayed Jaffer fended off Iraq's first penalty taken by Ahmed Yasin.
Dhirgham Ismail, Waleem Salem and Younis Khalaf were on target with the other spot-kicks for Iraq while Faozi Ayish and Sayed Dhiya scored for Bahrain.
Iraq, who reached the last four without conceding a goal and defeating strong contenders Kuwait and Saudi Arabia in their group matches, had taken the lead during the 18th minute.
Younis Mahmoud, the Iraqi captain, had latched onto a through ball from Hammadi Ahmed, muscled his way past defender Abdulla Marzooqi and slotted home to perfection.
Hussain Ali Baba equalised for the hosts just after the hour mark, curling home a stunning 20m free kick past Sabri. It was the first time the goalkeeper had been beaten in the tournament, after keeping a clean sheet for 330 minutes.
There was no addition to the score line in the ensuing minutes and extra-time, and the game was finally decided by a penalty shoot-out.
Bahrain will meet Kuwait in the third-place playoff on Friday evening.
Follow us @SprtNationalUAE