SuperSport’s continental journey was hanging by a thread after going down 1-0 in the reverse fixture in Kenya two weeks ago.
Sipho Mbule came within a whisker from profiting on 15 minutes but was unable to round off the good work by Onismor Bhasera with a dismal strike that flew over the top.
The youthful Matsatsantsa side, containing figures like Luke Le Roux and Dylan Stoffels, made life difficult for the Kenyans.
Le Roux connected with a cross from Bhasera in the 25th minute and with the goal seemingly in sight, the teen sensation eventually got blocked off by a body of defenders.
Just before the half-hour mark, Thabo Mnyamane, who looked to back a repeat performance showcased in the previous round, let rip from a free-kick but it was comfortably dealt with by the visiting keeper.
A big chance fell to the visitors three minutes to the interval, but striker Bernard Ondiek went inches wide with his attempt.
On the stroke of half-time, Mnyamane found space on the edge of the box and curled ina shot that struck the top of the crossbar.
The increased pressure from the hosts continued at the start of the second half, but a shot from close range by Stoffels in the 52nd minute was the closest they came to going ahead.
United eventually got their just rewards as they went ahead through an own goal by Shakava after 60 minutes played. It didn’t last long though as they conceded a minute later through Kahata.
They went back in front thanks to Mnyamane, who grabbed his third of the tournament with a sweetly taken strike, handing them a lifeline but they still needed another to progress.
Aubrey Modiba connected with Smith, who raced through on goal, but Boniface denied the forward from point-blank range after 73 minutes.
The young starlet was in the thick of things once more a minute later, with Smith quickly off his line to collect his effort.
A world-class save by Reyaad Pieterse eight minutes to the end denied Mahia the equaliser with Kahata closing in on a brace.
Meanwhile, Mnyamane was close to his double as he struck the post from outside the box in the 85th minute but that was as close as they came in the closing stages to ultimately make an early exit.
SuperSport: Pieterse, Kekana, Gould , Mokeke, Bhasera, Mokoena , Mbule, Webber, Le Roux, Stoffels , Mnyamane .
Subs: Mbanjwa, Boateng, Daniels, Modiba, Smith.
Gor Mahia: Boniface Oluoch, Harun Shakava, Joash Oluoch, Wesley Onguso, Joachim Oluoch, Philemon Otieno, Bernard Ondiek, Humphrey Mieno, Francis Kahata George Odhiambo, Meddie Kagere.