Angola took the lead in Tangiers with a fortuitous ricochet off the chest of their forward Va as Timothy Danladi tried to clear.
In the 92nd minute Anthony Okpotu stabbed home the equaliser to make amends for the earlier chances he missed and then Okechukwu Gabriel scored the winner in the 109th minute of the match.
Nigeria now play Sudan in Wednesday's second semi-final in Marrakech at the tournament only for players in domestic leagues on the continent.
The Nigerians dominated the opening exchanges while the Angolans were happy to rely on counter-attacks and set pieces.
Indeed, their efforts almost paid dividends in the first half as Nigeria keeper and captain Ikechukwu Ezenwa had to make the more difficult saves, firstly tipping over a fierce shot from Mano and then a double stop from the same player at closer range.
Okpotu's first missed chance came on the stroke of half-time as he had an effort headed off the line by Angola's Nary after goalkeeper Landu failed to catch a cross from Ikouwem Utin.
His next chance came just after the break, when he took advantage of hesitation between Landu and a defender on the edge of the area, but his shot went wide of a gaping goal.
Angola broke the deadlock 10 minutes after half-time when Danladi's attempted clearance hit the chest of Va and looped over Ezenwa into the goal.
Nigeria must have thought luck was against them in the 76th minute but Gabriel headed against the post from Dayo Ojo's cross.
With the seconds ticking away, Nigeria sent a free kick from inside their own half into the Angolan penalty box and Rabiu Ali's flicked header fell to Okpotu who this time put away the equaliser and sent his team-mates into wild celebrations.
Just after the break in extra-time, Gabriel drove across the area, finding himself some space, and managed to cut his shot back across goal and in, to seal the win for Nigeria.
The only downside for Nigeria were three players having to leave the pitch with injuries and coach Salisu Yusuf will be hoping that Emeka Ogbugh and Kalu Orji Okugbue can all recover in time to face Sudan in the last four, while Sunday Felaye is now a doubt for the rest of the tournament with an arm injury.