That is not true at all.
First, Iraq did not win that war. Both countries lost. Resolution 598, which ended the war, called for a return to pre-war borders. Although there were still some political arguments up even to the present time over exactly what were the pre-war borders, basically no territory changed hands.
Iraq did very good at the beginning of the war because they attacked Iran with extreme force and drove the Iranians back. As the war progressed the Iranians began to use unorthodox tactics (peasant rushes) and pure brute overwhelming of Iraqi positions and were able to drive into Iraq itself. Then a more solid front was established and the war drug on for several more years.
Ultimately estimates place total casualties at over 1 million, and it is estimated 200,000 Iraqi soldiers died and 400,000-800,000 Iranians soldiers died. Due also to the fact that both Iran and Iraq used irregular troops exact figures are impossible to attain.
As far as how the war itself played out, Iran had a Navy that was easily able to establish a naval blockade of Iraqi ports, Iraq had a small almost nonexistant Navy. The Iraqi air force on the other hand was much better than the Iranian air force and the Iranians intentionally avoided any contact with Iraqi forces in the air. However the Iraqi air force was not large enough nor could it sustain enough power in the air at all times to establish true Air Superiority, so the Iranians could make lightning raids against economic targets in Iraq with their smaller air force. From 1983 onward Iraq used poison gas and the fact that the use of gas began 5 years before the war ended, and that during that time Iran actually was pressing on into Iraq, shows that the gas did not alter the effects of the war.
Now, in an Iran-Turkish war it would be far different. The border defenses of Turkey are much more formidable than those the Iranians encountered in Iraq. The Turkish military has better weapons, training, more armored units, more helicpoters, a larger navy, and a much large air force. The mass suicide rushes could not push back the Turks significantly due to their superior weapons. The Turkish air force could and would hold air superiority quickly. The Turkish navy is more than capable of sailing into the Persian Gulf and destroying Iranian naval forces and instituting a complete naval blockade. This combined with Turkish air superiority would allow the Turks to destroy Irans internal industrial structure while it prevented them from bringing in resources from overseas. At the same time Turkeys much more advanced economy would be outproducing the Iranians, and would also not have to worry about Iranian air attacks. The Turks would also maintain all of their Mediterranean and Black Sea trade while depriving Iran of those same materials.
Turkey would win big.
Although Turkey and Iran seem very equivalent on paper, Turkey has a vast edge in military technology due to it's friends in Europe and the United States.
Some Comparative Facts on Both Countries (From CIA World Factbook)
Iran
GDP - $456 billion
Per Capita Purchasing Power - $7,000
% Below Poverty Line - 53%
Military Expenditures - $9.7 billion
Turkey
GDP - $468 billion
Per Capita Purchasing Power - $7,000
% Below Poverty Line - (Percentage Not Available from CIA, WFB)
Military Expenditures - $8.1 billion
So yeah, pretty close to each other but again Turkey has good friends who have supplied them well.