The 30-year-old, who was playing in his first match for six weeks, started slowly before winning 7-6 (7-3) 6-4.
Federer, now ranked fourth in the world, admitted he was not as sharp as he hoped after his break.
"Rust showed more on the returning side, trying to see the pace of the ball or being there and anticipating maybe was just missing a bit," he said.
Starace, ranked 54, created the only break point in the first set, which Federer saved before winning the set on a tie-break.Continue reading the main story Australian Open - 2004, 2006, 2007, 2010 French Open - 2009 Wimbledon - 2003, 2004, 2005, 2006, 2007, 2009 US Open - 2004, 2005, 2006, 2007, 2008
He immediately broke his opponent at the start of the second set and held on for victory.
Federer added: "In the second set I started to feel a bit better with confidence [with the] first set in the pocket, but I still thought Potito played a good match and made me work extremely hard."
It is the first match the Swiss star has played while ranked outside the top three since winning Wimbledon in 2003.