Totti struck an unstoppable winner in the 58th minute as Roma edged up to within six points of the top five while Juve's five-point advantage at the top of Serie A could be cut by Napoli on Sunday.
Lazio will also take joy in Roma's win as they can get back into the hunt for the Scudetto with victory at Siena on Monday night.
There were plenty of smiles and hugs as captains Totti and Buffon exchanged pennants prior to the coin toss, but as has been the case nine times in the past already, Totti ultimately wiped the smile off Buffon's face.
His goal in the 58th minute was worthy of winning any match, and it left Buffon with no chance.
Miralem Pjanic's direct free-kick attempt was blocked by a Juve defender and the ball fell to Totti 25 yards from goal.
He did not think twice as he made perfect contact with the ball, rendering Buffon's dive unnecessary as the net was already rippling before the Italy number one even got near it.
Totti's strike was no more than the Giallorossi deserved after dominating the first hour against the champions.
Pablo Osvaldo had already wasted a hat-trick of chances, the best of which a header straight at Buffon in the 57th minute, while the closest Juve had come was early in the second half when former Roma striker Mirko Vucinic volleyed wide.
Andrea Pirlo, who suffered an early scare after a clash of knees with a concerned Totti, had also brought a fine save out of Maarten Stekelenburg with a curling free-kick, but Juve were lacking their usual bite.
Roma, on the other hand, continued to cause the Juve defence concern with Erik Lamela dancing his way through, but overdoing it a little in the 70th minute as his last stepover let him down.
Nicolas Anelka was sent on by Juve coach Antonio Conte to add further weight to his attack but although he set up fellow substitute Sebastian Giovinco for a chance late on, he could not alter the course of the game as Roma picked up a morale-boosting victory at the Stadio Olimpico.