It has to be more than just ending the Iran hostage crisis. Maybe it is enough to give him a prolonged boost through the rest of '80 - but before the hostages were taken, Carter's approval was in the low 30s before receiving a 'rally behind the flag' type boost in November, '79. So, even before things went south in Iran, Carter was struggling a great deal politically.
So, I agree with the person who points to the hostage crisis actually helping Carter. Overnight, basically, his approval went from 32% to 58% and without it, there is the real potential of Kennedy derailing the president in a primary (and Carter's campaign often used a nasty tactic where they would tease the release in order to gain support when Kennedy was coming on strong ... only to have nothing happen).
There are just some elections that are impossible for the candidate to win ... at least without some massive scandal that shakes the entire race up. 1980 was a lot like 2008 in the sense that the incumbent party needed a miracle for victory and it was just never going to come.