Following a closely contested affair at the Athlone Stadium, City upped the ante midway through the first half.
Teko Modise, Roland Putsche and Ayanda Patosi dominated the midfield battle, and forced the likes of Abel Mabaso to defend too deep.
City took the lead in the 25th minute through Patosi, who fired home with a fierce shot from outside the box after being given acres of space by the Chippa defence.
The goal somewhat awoken the Chilli Boys, and they used Mark Mayambela's creativity to try and open up City's defence.
However, they forgot to shut the back door, and James Okwuosa was caught out of position by Lyle Lakay, who took him on as he raced through to the Chilli Boys goal.
Okwuosa took one for the team by fouling the left-footed winger just outside the box. Lakay made him pay by curling the ball past Daniel Akpeyi to make it 2-0 to City on the stroke of half-time.
Chippa played with more intent in the second half, and gave nothing away even when City looked menacing in the final third.
Teboho Moloi's men relied heavily on Mxolisi Macuphu, but the former Jomo Cosmos man was unable to breach City's defence.
The only time Macuphu came close to scoring was when his header shaved the crossbar in the latter stages of the game.
In the end, City held on for a much-needed win, and McCarthy would be pleased with the three points, moreover because his side scored twice for the first time since their 4-2 loss to Maritzburg United in December 2017.
They also kept their ninth clean sheet of the campaign.
The Students got off to the best possible start as Sifiso Myeni broke the deadlock 11 minutes into the encounter.
Baroka, who had not beaten Wits in the two teams' four previous encounters, knew that they had a mountain to climb.
The Limpopo-based side came into the clash on the back of a tough week which saw two of their senior players in Oscarine Masuluke and Olaleng Shaku exit the club.
Kgoloko Thobejane is also suspended, and MacDonald Makhubedu continued as caretaker coach in the absence of the outspoken coach.
While Wits often looked comfortable on the ball, they were forced into making mistakes at the back as Baroka really took the control of the game in the closing stages of the first half.
Baroka were rewarded for their persistence in the 41st when they were awarded a penalty, which was converted by Gift Motupa.
This was Motupa's ninth goal of the campaign, and the South Africa international is now one goal behind leading goalscorer Rodney Ramagalela with less than eight games to go before the end of the season.
Both teams didn't really come to the party in the second half, and they struggled to create clear-cut chances.
For that reason, they were forced to settle for a share of the spoils as Baroka remained ahead of the Students on the PSL standings.