The win extended Egypt's record unbeaten run at the Nations Cup to 17 games and kept its bid alive for an unprecedented third successive title.
Substitute Mohamed Nagui's goal at the start of the overtime was the difference in the game. Nagui broke in and scored, taking advantage of a terrible back pass by veteran defender Geremi.
Hassan, who had tied the score for Egypt with a dipping free kick from 35 yards in the 39th minute, added a third goal for Egypt in the 94th minute when his free kick was blocked by Cameroon goalkeeper Idriss Carlos Kameni, bounced off the woodwork and was ruled to have crossed the line.
Hassan put the Lions ahead in the 25th minute when he flicked a corner from Achille Emana into his own net.
It was not a good tournament for the aging Lions.Rigobert Song's run of 36 successive Nations Cup appearances dating back to 1996 came to an end when he was not picked to face Egypt.