The Roma captain ran onto a clearance from Miralem Pjanic before smashing the ball past Italy keeper Gianliugi Buffon to leave Juve on 55 points.
The striker has now netted 224 Serie A goals, one less than the second all-time top scorer Gunnar Nordahl, and his strike capped a superb second-half display from Roma.
Juve manager Antonio Conte was left lamenting his tired team's disappointing display amid a packed fixture list.
"We're not happy about playing on the Saturday and having three games in seven days," he said in the wake of a 3-0 win at Celtic in the Champions League last 16, first leg on Tuesday and last Saturday's 2-0 Serie A win over sixth-placed Fiorentina.
"That tiredness from playing those three games against big teams is the only excuse I can give as tonight we didn't play as a team, and when we don't play as a team anyone can beat us.
"I hope that in the future when they're organising fixtures that there will a little bit of respect for a team that is representing Italy in Europe."
Roma's first victory this year takes them to seventh on 37 points from 25 games and ends a run of six games without a win that saw a fans revolt and Zdenek Zeman sacked two weeks' ago.
"I expected it [the performance]," Totti told Sky Sport Italia. "This is a team that every time it comes out onto the pitch it looks to give its best for itself and for the fans, and that recently we haven't been able to to do," .
"Tonight we had the character to beat a really good team.
"It's easy to celebrate after a win like that. We've got to think about next week and the week after that. We all did well."
Totti was lucky to still be on the pitch to score, however, after a late, high challenge on Andrea Pirlo in the first half saw the Juventus midfielder's right knee cut open.
The pair were battling for the ball when Pirlo span away from Totti, whose studs scraped down his opponent's leg.
"He got to the ball before me. Obviously, I was upset [to hurt him like that] but the important thing is that it was nothing serious," Totti said of the incident.
The first half was a timid affair, with Maarten Stekelenburg's save from Pirlo's 19th-minute free-kick the closest anyone came to a goal.
However, Roma were by far the better side in the second period, and could have won more easily against a below-par Juve side if they had not have been so wasteful in front of goal.
Pablo Osvaldo headed straight at Buffon from close range a minute before Totti put Roma ahead and their Italy midfielder Daniele De Rossi fluffed the simplest chances when he missed the ball on the edge of the six-yard box six minutes after the goal.
In Saturday's early match Palermo drew 1-1 at Chievo Verona to move off the bottom of the table although the result leaves the Sicilians still seeking their first away win this season.
Palermo are now 19th with 19 points from 25 games, three points fr
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.