Gedo curled in a shot from within the area to give Egypt its record seventh title. No other team has won the biennial tournament three consecutive times.
"From the first day we arrived we said we were here to win the tournament," Egypt assistant coach Shawki Garib said. "And we did it, even if it was harder than in 2006 and 2008."
Egypt, which hasn't played in a World Cup since 1990, will again miss the showcase tournament this summer. Unbeaten in 19 matches in the African Cup, the team lost to Algeria last November in the playoffs for a World Cup place in South Africa.
"We play better during big tournaments than during our qualifying campaigns," Garib said. "Over three weeks, it's easier to develop team cohesion."
World Cup qualifier Ghana, which had been hoping to earn its first continental crown since 1982, dominated for most of the match but failed to create clear-cut chances.
Fielding four members of the team that won the Under-20 World Cup last year, Ghana defended neatly and were able to move swiftly into the Egypt half. However, Ghana failed to support its strikers.
Asamoah Gyan, who scored Ghana's winners against both Angola and Nigeria in the previous stages, went close in the 52nd minute with a perfectly curled free kick that was tipped over the bar by El Hadary.
Gyan was a threat again in the 74th minute when he missed the target following a quick counterattack before forcing El Hadary to palm the ball away on a free kick.
"We played carefully, we were very patient and methodical," Ghana coach Milovan Rajevac said. "We played to score and we controlled the match. It was unfortunate to concede a goal."
Egypt finally broke the deadlock against the run of the play when Gedo, the top striker of the tournament with five goals, was perfectly set up on the left side of the box after a nice one-two and scored with a curling shot past goalkeeper Richard Kingson at the far post.
Egyptians players and members of their staff invaded the field at the final whistle while fans lit flares. Striker Mohamed Zidan was blocked by security officers as he tried to reach the stands and was unable to join Egypt's fans in their celebrations.
Egypt scored 15 goals and conceded just two on its way to the title and beat four World Cup qualifiers: Nigeria, Cameroon, Algeria and Ghana.
"I'm really proud of the players' achievements," Garib said.
The team's success was celebrated loudly in Cairo, with roving bands of revelers hitting the streets, banging drums, blasting air horns and setting off fireworks. One man spun an Egyptian flag around him in the style of a whirling dervish.
"They played with confidence and seemed convinced they could pull off a miracle at the end and they did that," said Nabil Abdel-Hay, 57, who watched the match with hundreds of others on an outdoor screen in downtown Cairo. "I believed this team deserved to get to the World Cup. It's because they didn't get in to the World Cup that they played with double the energy to get here."
Associated Press Writer Paul Schemm contributed to this report from Cairo.