Just for a day? Using public transport? I think you might spend the better part of the day on trains and buses and not see anything at all of San Gimignano. Theoretically you need to catch a fast train to Florence from Rome, from Florence catch a bus - that's the fastest way.
The shortest options I am seeing on Google Maps -
https://goo.gl/maps/koRWfETqhd72 - are around 3 hours and 25 min to get there..... but consider whether they can be worked for you to get there and then find a suitable one to get back. If you spend 7 hours getting there and back in one day, how long will you be in San Gimignano in the end? I would suggest skipping SG if you're fixed on Rome as your base and go to someplace closer to Rome, such as Orvieto!

I would much rather you enjoy your time here and decide you need to come back than remember it like a nightmare