In-form striker Ruzaigh Gamiliden scored twice to give Swallows a 2-0 lead in the first-half to take his tally to seven goals in the league this season.
However, City did not back down as they pull one back through Mduduzi Mdantsane to make it 2-1 nine minutes into the second-half.
Swallows then pushed for another goal and they netted just after hour-mark when Junaid Sait scored his first ever goal in the top flight to make it 3-1 to the hosts.
City's top goalscorer Mdantsane completed his brace in stoppage time, but the attacking midfielder's late strike proved to be merely a consolation as Swallows held on to win 3-2.
The victory saw Swallows go level on points with PSL log leaders Mamelodi Sundowns, who were in continental action on Tuesday, while City remained fourth on the standings.
The victory took Stelllenbosch to the seventh spot on the league standings, while Tshakhuma, who are now winless in four matches, slipped down to 12th place.
At Mbombela Stadium in Nelspruit, Baroka and TS Galaxy played to a 2-2 draw in an enthralling match.
The deadlock was broken in the second-half when Ananias Gebhardt and Gerald Phiri grabbed two quick goals respectively just before the hour-mark to hand Baroka a 2-0 lead.
Galaxy then railed in the closing stages of the match and they pulled one back through Mokete Mogaila to make it 2-1 with Mxolisi Macuphu providing an assist.
The comeback was complete in the 86th minute and it was Macuphu, who scored to ensure that the encounter ended in a 2-2 draw.
The draw left Baroka and Galaxy placed eighth and 11th respectively on the league standings.
Lastly, Lamontville Golden Arrows' clash with Black Leopards at the Sugar Ray Xulu Stadium was postponed due to bad weather conditions.