The veteran attacker netted twice to become joint all-time top goalscorer in the Rome derby with 11 goals in all official games, level with Dino Da Costa
Stefano Mauri gifted the away side the lead in the 25th minute, with Felipe Anderson making it two only three minutes later. Nevertheless, the Giallorossi bounced back after the interval as Totti netted twice to restore parity.
Lazio started the match with attacking intentions and Antonio Candreva tried his luck within minutes from kick off, only to see his shot from 25 yards out go wide.
The Italy international again threatened 10 minutes later after controlling the ball on the left before cutting inside and unleashing a shot toward the far post, which went only beyond the target.
Totti then hit the wall with a free kick from a dangerous position, while Alessandro Florenzi’s shot after being set up by Daniele De Rossi was blocked.
Stefano Pioli’s men went 1-0 up halfway through the first half after Mauri beat Morgan De Sanctis after some brilliant work from Felipe Anderson down the left.
Lazio didn’t allow Roma any time to breathe and they doubled their lead shortly after the opener. Mauri turned provider this time around, with Felipe Anderson taking advantage of some disappointing goalkeeping from De Sanctis.
Juan Iturbe got a chance to peg one back for Roma around the half-hour mark, but the Argentine fired his shot high over the goal, while a second attempt in the 38th minute was blocked by a Lazio defender.
The home side started the second half in superb fashion and needed only three minutes to peg one back. Substitute Kevin Strootman set up Totti and the experienced attacker had no trouble finding the net from close range.
Iturbe then came close to levelling the scoring with a fantastic long-range strike, yet Federico Marchetti pulled off a fine save to deny the winger.
The guests kept on pushing for a third goal and Mauri was unlucky to see his shot only hit the upright, before Candreva was denied by De Sanctis.
Roma made their arch-rivals pay in the 64th minute when again Totti made it 2-2 with a sublime finish. Jose Holebas sent in a good cross toward the far post and the 38-year-old acrobatically volleyed home to restore parity.
Strootman continued to impress after coming off the bench and tried his luck with a powerful shot in the 72nd minute, only for Marchetti to collect the ball without noteworthy problems.
Miroslav Klose got a good chance for Lazio to decide the match in the closing minutes, yet De Sanctis made amends for his earlier mistake with a fine reflex.
Roma remain second in the Serie A table with 40 points from 18 games, while Lazio sit third with 31 points.