The 34-year-old scored a cheeky penalty, dinking the ball straight down the middle - known in Italy as the spoon - as goalkeeper Samir Handanovic dived out the way on 57 minutes.
And then he netted with the final kick of the match to give Roma a dramatic victory just seconds after Udinese had a would-be winning goal ruled out.
After the game Totti said he had showed his critics that his career is far from over.
"In the vital moments that's when you see the true make of a player," he said.
About the penalty he said the desire to shoot in that way had come to him on a whim.
"I wanted to do it, I wanted to show everyone that I'm not finished, that I can do everything.
"Even at 20 I didn't feel as good as I do now. This is the reaction to the critics who've sincerely hurt me.
"That's how great players react and I'm delighted."
Totti has not had one of his best seasons as father time seemed to have caught up with him.
He was often left to warm the bench under Claudio Ranieri but since Vincenzo Montella took over the hot seat, he has been back in the team and amongst the goals.