Sibusiso Masina and an own goal from Kabelo Mahlasela came in the dying stages after Celtic had defender Tshepo Rikhotso sent off.
Masina was set up by a fine run from Aubrey Ngoma before he drew goalkeeper Patrick Tignyemb before putting the ball into the net in the 114th minute
The goal came as a relief for a crowd denied any real entertainment up to then.
Thabo Nodada’s dribbling set up the second goal as Mahlasela turned the ball into his own net as he attempted to clear just two minutes later.
“We didn’t play well but we are happy to get through to the next round,” said City coach Eric Tinkler afterwards.
In the opening 10 minutes, home goalkeeper Shu-Aib Walters was twice called on to make a diving save but on both occasion shots from Lyle Lakay and from Musa Nyatama did not prove testing.
Khethokwakhe Masuku soon after had a better shot but again it lacked the power to challenge Walters.
The first decent chance of the game fell for Judas Moseamedi after a surging run and cross from the hard-working Australian midfielder Matthew Sim. But the big striker, back from injury, lacked the requisite aggression to turn the pass into the net.
Then some six minutes before half-time Sim had a chance but hit his left foot shot wide.
The second half was even more bereft of chances with both sides poor in possession and with their final touch.
Celtic substitute Deon Hotto blasted two left footed efforts well wide as he cut in off the flank and near the end of the 90 minutes Sibusiso Mxoyana burst through but also missed.
In extra time, the boredom for the handful of spectators continued until Rikhotso’ dismissal opened the door for City to take the tie. “Everything collapsed in that moment of madness,” said beaten coach Serame Letsoaka.