In-form striker Ruzaigh Gamiliden gave Swallows a 2-0 lead in the first-half to take his tally to seven goals in the league this season.
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 league to make it 3-2 to the hosts.
City top goalscorer Mdantsane completed his brace in stoppage time, but the attacking midfielder's late strike proved to be a consolation as Swallows held on to win 3-2.