Thabo Qalinge scored a 68th minute decider after his teammate Issa Sarr cancelled out debutant Tokelo Langa's opener before the break at Orlando Stadium.
In the other cup tie on Sunday, Ajax Cape Town gained revenge over Mpumalanga Black Aces with a 3-0 scoreline at Cape Town Stadium.
Bucs and Ajax join Kaizer Chiefs, AmaZulu, Mamelodi Sundowns, holders Platinum Stars, SuperSport United and Bidvest Wits in the quarter-finals of the competition, with the PSL to decide the next match-ups via a draw on Monday.
Pirates, who had lost their previous two games, started their duel brightly, as Lehlohonolo Majoro's ninth minute strike drew a sharp save from Dino Visser. Majoro looked lively as he sought to make the most of being handed a start ahead of Kermit Erasmus.
City, however, took a surprise lead in the 15th minute, as Langa's powerful shot beat Senzo Meyiwa after taking a big deflection off Sarr.
Sarr, though, equalised three minutes later with a glancing header from a Mpho Makola corner.
The hosts threatened early into the second stanza, as Makola dragged a shot wide following some neat build-up play.
Makola came close again in the 58th minute, but couldn't keep his free header down off a cross from overlapping left-back Patrick Phungwayo, who was in the team for the suspended Thabo Matlaba.
Man of the Match Phungwayo swung in another decent cross just past the hour-mark, but a straining Majoro was likewise unable to steer his header on target.
Qalinge, however, later settled affairs with a first-time shot in the box after being teed up by Majoro.