Totti had been out for over a month following knee surgery, but took his Serie A goal tally this season to nine goals.
Ranieri said: “Francesco immediately proved how much we had missed him. I said it would be difficult this season without him and you could clearly see what a difference he made.
“Totti is a jewel that we must safeguard and I really didn't expect a performance like this. Aside from the three goals, he did absolutely nothing wrong and was always in the right place.”
Ranieri also praised the Brazilian goalkeeper, who was picked despite Alexander Doni's recovery.
“Julio Sergio proved he is ready. He is going through an excellent period of form and it's only right to give him the space he deserves.”