Substitute Vincent Aboubakar swept in the winner two minutes from time, flicking the ball over defender Ali Gabr and thumping it home.
Nicolas Nkoulou had earlier equalised for Cameroon, rising highest to power home a header on the hour mark.
The equaliser cancelled out Mohamed Elneny’s opener on 22 minutes with a beautifully taken near-post strike.
Underdogs Cameroon had already upset the odds to reach the final and stunned the much-fancied Egyptians with the late dramatic winner from Aboubaker, after fellow substitute Nkoulou had drawn them level.
The Pharaohs – bidding for an eighth title after seven years in the international wilderness – started comfortably and Elneny’s opening strike capped a wonderful fluent move down the right.
The Gunners midfielder started the move and finished it, after receiving the ball from Mohamed Salah in the box and sweeping it past Fabrice Ondoa into the roof of the net at the near post.
But Egypt invited the Indomitable Lions to come at them in the second half and they paid a heavy price.
The excellent Cameroon forward Benjamin Moukandjo whipped in an excellent menacing cross and substitute Nkoulou muscled his way through the Egyptian defence to beat Ahmed Hegazy to the ball and bury it past 44-year-old Essam El Hadary in the Egyptian goal.
The contest developed into a fascinating final, with Cameroon, inspired by the excellent Christian Bassogog and Jacques Zoua, pinning Egypt back and limiting them to long balls to Salah and substitute Ramadan Sobhi.
Fatigue soon set in in the Egyptian ranks and Cameroon got their reward for increasing the pressure.
Aboubakar picked up the ball at the edge of the box, flicked it over the stranded Gabr, before gathering, taking a step and smashing home off his right foot for a fitting winner.