The origin of this crisis could be found in the 1950s. In the 1950s, the US helped to overthrow Mohammed Mosaddegh, the democratically elected Prime Minister of Iran. The US felt that Mosaddegh was a communist and that he could not be allowed to remain in power. In his place, the US installed the Shah of Iran, who ruled as something of a repressive dictator.
The Shah's rule was hated by many Iranians, particularly those who wanted Iran to be much more of an Islamic state (the Shah was very secular). They came to associate his rule with the United States and resented the US for imposing him on them. Because of this, in 1979, Iranian revolutionaries who had overthrown the Shah attacked and took the US embassy in Teheran and held 66 Americans hostage for over a year. This was the Iranian crisis that helped to cause President Carter to lose the 1980 election to Ronald Reagan.