Manucho Goncalves netted a 25-yard stunner but Angola still crashed out of the African Nations.
The Manchester United new boy, 24, on loan at Panathinaikos, struck after Hosni Rabou's penalty put Egypt ahead.
But Amr Zaki's 38th-minute winner for the holders set up a semi-final with Ivory Coast.