Elias Pelembe gave the Clever Boys the lead in the 35th minute after great build-up play between Sibusiso Vilakazi, Daine Klate and James Keene.
Thapelo Morena restored parity four minutes into the second half after being set up by Lerato Lamola.
But there was to be late drama as Moeneeb Josephs brought down Lamola in the penalty area in stoppage time. Musa Nyatama took the responsibility and converted from the spot.
The result comes as welcome relief for Phunya Sele Sele, who move away from the bottom five and up to ninth, while Wits' title hopes are hit again as they now lag four points behind leaders Mamelodi Sundowns.