The military club, who held Wehdat to a goalless draw in the first-leg in Jordan, went ahead in the first-half through Amer Sabri's header.
Hassan Abdul-Fattah grabbed the precious equalizer eight minutes from time as Wehdat, who are managed by Egyptian coach Mohamed Omar, were close to booking a last-eight berth.
However, Ghanian striker Papa Arko struck home seven minutes into stoppage time to hand the hosts an unforgettable win which lifted them to the competition's group stage.
Tempers flared following Al-Gaish goal as Wehdat players protested the referee's decision to prolong the match for one more minute after initially announcing that the added time would be six minutes.
Yassin Abdul-Aal almost put the hosts in front on the quarter-hour mark when he latched on to Mamdouh Abdul-Hai's through pass and went clear on goal.
A Jordanian defender intercepted to deflect Abdul-Aal's shot and keeper Amer Shafie was on alert to brilliantly tip the ball over the bar.
Sabri broke the deadlock in the 20th minute when he rose unmarked to head home Gomaa Mashour's free-kick from the right.
Abdul-Fattah could have leveled the score just two minutes later but his low shot from inside the area went just wide of the post.
The impressive midfielder, who was a constant threat throughout, hit the side netting with a powerful shot ten minutes after re-start.
Abdul-Fattah finally broke Al-Gaish resistance in the 82nd minute, capitalizing on a mis-timed jump by keeper Wael Khalifa to poke home.
The match was heading in the Jordanians' favor but Papa Arko connected with Hossam Abdul-Aal's free-kick from the left flank to head into the roof of the net and send the home fans into ecstasy.
Watch the match's goals