The Swiss world number one needed more than 2-¼ hours to squeeze past Czech Radek Stepanek 7-6, 6-7, 7-6 at the invitational Kooyong Classic as a gusting breeze played havoc with Federer's service rhythm.
Andy Roddick faced no such problems and enjoyed a swift 6-2, 6-3 work out against Germany's Tommy Haas in a repeat of last year's final.
Federer, playing his first match of the season, would have hoped for an easier outing on a steamy day in Melbourne but had to dig deep to pull out the victory.
At least Federer would be relieved to stay in contention for the Kooyong title as he fell at the first hurdle 12 months ago.
Federer plays cricket with tsunami survivors
Federer looking to extend dominance into 2007
Federer meets Indian tsunami survivors
Meet the man who knows Federer best
Federer cheers for Tiger