Mohamed Salah provided two assists against Angola
A dynamic Angola side stunned Egypt after going 2-0 up inside 36 minutes, thanks to a goal from Valencia striker Helder Costa and a penalty from M'Bala Nzola.
However, Mohamed Salah inspired a comeback when he set up Mohamed Elneny for Egypt's first goal on the stroke of halftime before providing another assist for right-back Akram Tawfik 14 minutes into the second half.
Egypt were lethargic and porous in the first half but regrouped after the restart to avoid what would have been their first defeat under Portuguese coach Carlos Queiroz, who led the team to back-to-back victories over Libya.
The Pharaohs, who are on top of their group with 11 points, gained an unassailable four-point lead over second-placed Gabon, who defeated Libya (six points) 1-0 earlier in the day.
Egypt and Gabon meet in a dead-rubber on Tuesday.
Queiroz surprisingly introduced Ahly striker Mohamed Sherif as a left winger, having opted against calling up a replacement for Stuttgart winger Omar Marmoush, who is nursing an ankle injury.
Veteran playmaker Abdallah El-Said was also given the nod ahead of Ahly's in-form schemer Magdi Afsha, with Galatasaray's Mostafa Mohamed deployed as a lone striker.
Egypt were taken aback by a lively Angola display, which resembled their performance in the opening group game in September when the seven-time African champions claimed a narrow 1-0 win despite producing a below-par display.
Angola caused constant menace to Egypt down the flanks, although it was the visitors who created the game's first real chance against the run of play.
On 23 minutes, Sherif was released by a deft pass from left-back Ahmed Fattouh, only to see his angled lob go over the bar.
Angola deservedly went ahead three minutes later when a right-wing cross was cleared by central defender Ayman Ashraf into the path of Costa, who planted a fine left-foot shot into the bottom corner from inside the area.
Egypt were stunned further when Angola were awarded a penalty after Tawfik kicked the ankle of substitute Zini, who skipped past him in the area.
Nzola sent keeper Mohamed El-Shennawi the wrong way, to the delight of the few thousand fans at the 11 November Stadium.
Elneny narrowed the gap just before the halftime whistle when his first-timer from inside the area found the far top corner after a cut-back from Salah with the outside of his boot.
The introduction of defensive midfielder Hamdi Fathi in the second half made all the difference, with Egypt closing down spaces and leaving Angola with little room to operate.
The strategy paid dividends as Egypt wrestled control for long spells, restoring parity on 59 minutes when Tawfik collected a pass from Salah on the edge of the area before his angled drive took a wicked deflection off To Carniero and wrong-footed keeper Hugo Marques.
Both sides then laboured in the latter stages, with Egypt content to play it safe and secure passage to the final two-legged playoff in March for a place in the 2022 Qatar finals.
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO_Sports and on Facebook at AhramOnlineSports.)