Nancery the situation in Iran was complicated and I'm not an expert but I'll explain to the best of my knowledge. Iran's political structure is a mixture of secular and clerical, with a democratically elected President at the top of the secular structure and the Supreme Leader (Ayatollah Khomenei) at the top of the clerical structure that holds most of the real power. As the name suggests, the Supreme Leader is the country's ultimate authority.
At the time of the 'Axis of Evil' speech, the president of Iran was Mohammad Khatami, a reformer who advocated the expansion of civil liberties, a free market and a more open foreign policy focused on foreign investment in Iran and constructive relationships with the West and the Asian powers. He was elected by a clear majority of Iranians in a vote with a massive turnout. Now that all sounds like a dream come true in terms of neutralizing a nuclear threat, combating Islamic extremism and securing a powerful Western ally in the Middle East, right?
His government made mistakes of course but his program was making progress. Iran was even helping the US in its hunt for Al Qaeda leaders and affiliates. At home, Khatami faced fierce opposition by the hardline Islamists within the government (dual-structure with clerically-appointed people in key positions of power) and progress was painfully slow. What he really needed was to show that his approach was working: sanctions being lifted, foreign investment coming in, acceptance and partnerships with the Western powers. Right in the middle of this, in 2002, President Bush delivered his State of the Union 'Axis of Evil' speech, where he defined Iran, along with Iraq and North Korea, as an enemy of the American people and a focus for the war on terror. That was it. Khatami's program of reform and international dialogue was instantly undermined. Khatami was humiliated, the hardliners were proved right: it was no use trying to be friends with the Great Satan. His legislative program was vetoed, the extremists cracked down on the electorate and he was eventually succeeded as President by Mahmoud Ahmadinejad, who is an extremist hostile to everything Khatami stood for.
America had the best chance since the Revolution of securing a friendly Iran and Bush comprehensively blew it.