Goalkeeper Gabaski was the hero, saving two penalties as Egypt edged past hosts Cameroon in a penalty shootout after a goalless draw to set up an Africa Cup of Nations final against Senegal.
Sunday's final sets up a tantalising meeting between Liverpool forwards Mohamed Salah and Sadio Mane at the same venue - the Olembe Stadium in Cameroon's capital Yaounde (kick-off 19:00 GMT).
Hosts Cameroon had shown more impetus in 90 minutes, twice hitting the post through Michael Ngadeu-Ngadjui's looping header and Samuel Gouet's thunderous long-range strike, which flicked the woodwork.
Egypt's star man Salah was kept quiet for much of the game, curling a strike from outside the area narrowly over and almost profiting from a loose back pass, but he could not convert.
But he did not have to step up in the shootout as Cameroon missed three of their efforts, with Gabaski saving from Harold Moukoudi and James Lea Siliki, while Clinton N'Jie side-footed wide.
An ill-tempered ending to normal time had seen Egypt coach Carlos Queiroz sent off for remonstrating with the referee and his assistant Wael Gomaa cautioned too.
It means they will both be missing from the touchline for the final as Gomaa was also yellow carded in the quarter-final against Morocco.
Meanwhile, Cameroon will face Burkina Faso in the third/fourth-place play-off, which has been brought forward a day to Saturday (19:00 GMT).
Egypt gain revenge over Cameroon
This was a meeting between the two most successful teams in the competition's history with record seven-time winners Egypt up against Cameroon.
The hosts had triumphed on five occasions with the last of those coming in 2017 when they defeated Thursday's opponents 2-1 in the final, but Egypt gained revenge on this occasion.
As well as pitting club team-mates Salah and Mane up against each other, the final will be the first of three meetings between Egypt and Senegal over the next two months as they also contest a two-legged play-off for a place at the World Cup in Qatar.
There was a feisty build-up to this meeting as Cameroon legend, and now the football federation's president, Samuel Eto'o referred to the game in a speech as a "war".
But Egypt boss Queiroz felt it was a "bad message" particularly after eight people had died and 38 more injured in a crush at the Olembe Stadium.
All eyes were on Salah, who curled narrowly over after eight minutes, but Cameroon were the dominant side as Ngadeu-Ngadjui's looping header hit the post and the defender miscued from six yards following the resulting corner.
Salah had a sniff in the second half when he latched onto a poor backpass to take him through on goal, but was foiled by goalkeeper Andre Onana flying out of his area.
Karl Toko Ekambi's glancing header was then straight at Gabaski, while Gouet's powerful drive was close as the game went into extra time.
Middlesbrough midfielder Lea Siliki's free-kick from out wide almost sailed in, landing on the roof of the net, but the contest went to penalties.
Gabaski, who stepped up after Egypt's first-choice keeper Mohamed El Shenawy was injured in their last-16 win over Ivory Coast, provided the heroics to ensure his side won their sixth shootout in a row to progress.
Analysis - One miss meant 'more pressure'
Former Ivory Coast midfielder Yaya Toure on BBC Three:
"Egypt deserve their win. They have been playing really well defensively. I don't know if Vincent Aboubakar had one shot on target. They frustrated Cameroon.
"It seems to me like Cameroon did not prepare for the penalties. When I was with Ivory Coast, after each session we had a training shoot-out. It did not look like they had done that. As soon as they missed one, there was pressure and more pressure. And you see with N'Jie, I don't know what was going through his head."
Former Manchester City defender Nedum Onuoha:
"Whenever you see a team in a huddle ahead of a shootout, you never see someone who is really angry because they have not been selected to take a penalty. It is because it is a very tough situation.
"People who want to take one, it doesn't mean they are ready for the moment."
- 21CastellettoSubstituted forMoukoudiat 99'minutes
- 8Zambo Anguissa
- 14Oum GouetBooked at 61minsSubstituted forLéa Silikiat 80'minutes
- 18HonglaSubstituted forOnanaat 108'minutes
- 3Moumi NgamaleuSubstituted forN'Jieat 86'minutes
- 12Toko EkambiSubstituted forBassogogat 98'minutes
- 27Léa Siliki
- 16Abou Gabal Ali
- 3Abdel WahedBooked at 37minsSubstituted forAbdelghanyat 85'minutes
- 2Abdelmonem Elsayed Mohamed Ahmed
- 17ElnenyBooked at 61minsSubstituted forAhmed Abdelmonemat 86'minutes
- 5Abdul Fattah
- 4El SoleyaSubstituted forTrézéguetat 45'minutes
- 14Ahmed AbdallahSubstituted forMohamed Ragaei Bakrat 105'minutesSubstituted forSayedat 118'minutes
- 22MarmoushSubstituted forSobhiat 63'minutes
- 9Mohamed Ragaei Bakr
- 18Ahmed Abdelmonem
- 20Eldin Mahmoud Ibrahim
Match ends, Cameroon 0(1), Egypt 0(3).
Penalty Shootout ends, Cameroon 0(1), Egypt 0(3).
Penalty missed! Bad penalty by Clinton N'Jie (Cameroon) right footed shot is close, but misses to the right. Clinton N'Jie should be disappointed.
Goal! Cameroon 0(1), Egypt 0(3). Mohanad Lasheen (Egypt) converts the penalty with a right footed shot to the bottom left corner.
Penalty saved! James Léa Siliki (Cameroon) fails to capitalise on this great opportunity, left footed shot saved in the bottom right corner.
Goal! Cameroon 0(1), Egypt 0(2). Mohamed Abdelmonem (Egypt) converts the penalty with a right footed shot to the top right corner.
Penalty saved! Harold-Desty Moukoudi (Cameroon) fails to capitalise on this great opportunity, right footed shot saved in the bottom right corner.
Goal! Cameroon 0(1), Egypt 0(1). Zizo (Egypt) converts the penalty with a right footed shot to the bottom right corner.
Goal! Cameroon 0(1), Egypt 0. Vincent Aboubakar (Cameroon) converts the penalty with a right footed shot to the centre of the goal.
Penalty Shootout begins Cameroon 0, Egypt 0.
Second Half Extra Time ends, Cameroon 0, Egypt 0.
Substitution, Egypt. Zizo replaces Mohamed Sherif.
Harold-Desty Moukoudi (Cameroon) wins a free kick in the defensive half.
Foul by Mohamed Sherif (Egypt).
Corner, Cameroon. Conceded by Trézéguet.
Corner, Cameroon. Conceded by Mohamed Abdelmonem.
Attempt blocked. James Léa Siliki (Cameroon) left footed shot from outside the box is blocked. Assisted by Vincent Aboubakar.
Substitution, Cameroon. Jean Onana replaces Martin Hongla.
Second Half Extra Time begins Cameroon 0, Egypt 0.
Substitution, Egypt. Mohamed Sherif replaces Mostafa Mohamed.