Totti opened the scoring in the 70th minute before the Roma captain added his second from the penalty spot with seconds remaining.
Lazio ended the game without both Stefan Radu and Christian Ledesma both shown red cards in the final stages of a heated encounter.
The result dropped Lazio to fifth place, with Roman one place and two points behind them.
Vincenzo Montella's Roma went into the encounter on the back of a 3-0 midweek defeat at Shakhtar Donetsk that saw them crash out of the Champions League.
Acting hosts Roma could have gone in front early on when David Pizarro's 30-yard stinging drive struck the crossbar with Lazio goalkeeper Fernando Muslera already beaten.
Midway through the first half, Mirko Vucinic latched onto Daniele de Rossi's cross but his weak header provided an easy catch for Muslera.
Lazio had the first chance in the 34th minute when Sergio Floccari fed Hernanes outside the area and his left-footed strike went wide.
Roma then threatened just before the interval.
Totti fed Juan inside the area and his six-yard effort was blocked by Lazio defender Ledesma.
Lazio looked more lively after the restart and, in the 53rd minute, Floccari's header from Stefan Lichtsteiner's cross flew just wide.
Lazio again could have broken the deadlock in the 66th minute but Floccari's header, this time from Hernanes' cross, went inches past the far post.
Despite their efforts, it was Roma who took the lead soon after when Totti's 30-yard strike towards the centre of goal beat Muslera to break the deadlock in spectacular fashion.
Lazio suffered a further blow with three minutes remaining when Radu was handed his marching orders after headbutting Roma's Fabio Simplicio.
Shortly afterwards, the referee pointed to the spot after Giuseppe Biava held Simplicio inside the area.
Totti coolly struck towards the far post for his second of the afternoon.
Lazio then had Ledesma sent off for dissent to wrap up a dismal afternoon for the Biancoceleste.