Napoli, under the watchful eyes of former star Diego Maradona, began the match two points off the pace and hoping to upset Rudi Garcia's early season pacesetters. However, Rafael Benitez's men spurned two great chances in the first half when both Goran Pandev and Lorenzo Insigne missed the target from scoring positions.
After Pjanic's curling free kick gave Roma a 1-0 lead late in the first half, the Bosnia-Herzegovina midfielder made it two - this time from the spot - after Napoli defender Paolo Cannavaro saw red for a clumsy challenge on Marco Borriello.
Roma now sit top with a maximum 24 points from eight games with Napoli, conceding their first defeat of the season, losing second place to Juventus, who visit Fiorentina on Sunday.
Pjanic fired a warning early on when he hit a goalbound rocket on the bounce that was blocked, and for the opening quarter hour Napoli were tamed by Roma's pressing.
Gervinho also spurned an early chance, scuffing his shot high with Pepe Reina at his mercy and minutes later Pjanic hit a low angled drive from distance which whizzed past Reina's upright.
Tempers flared just before the half hour when Maicon was fouled by Giandomenico Mesto, handing possession to Pandev who was then cautioned for a wayward elbow as he was challenged from behind. Pandev somehow spurned Napoli's best chance of the half after escaping his marker in midfield to run on to Insigne's superb long ball.
The striker was clear on goal but former Napoli keeper Morgan De Sanctis shut down the angle and got a hand to Pandev's shot, which was then cleared acrobatically by Daniele De Rossi.
Roma, however, had the momentum. Florenzi's angled low drive went just a metre wide of Reina's upright and Gervinho had claims for a penalty waved away after he tumbled in the area as he cut in from the left.
Kevin Strootman then saw a drive from distance just sail over the bar. Insigne spurned a second great chance for Napoli when he sent his low shot from close in off the post after evading a clumsy challenge from Maicon.
Roma finally broke the deadlock late in injury time, Pjanic stepping up to send a sublime curling free kick past Reina after Gervinho had been upended and won a free kick 25 metres out.
Napoli dominated the opening exchanges after the restart and Gokhan Inler almost levelled with a superb first-time drive the came off de Sanctis's upright. But there was never much threat from Benitez's men, who appeared to be missing the power and drirve of Gonzalo Higuain.
Maicon showed good skill deep on the right to squeeze between two defenders and send in a low cross for Florenzi which the forward narrowly missed. Higuain finally made his appearance on 68 minutes, replacing Pandev, but Napoli suffered a blow moments later when Cannavo was sent off for manhandling Borriello in the area.
Pjanic made no mistake from the spot, sending Reina the wrong way with a powerful shot that rocked the back of the net.