The top-seeded Swiss had a match-point in the second set tiebreaker despite trailing 5-1 early, but he needed three more in the deciding set before advancing to the second round.
"It was more like a serving contest,'' said Federer, who did not face a break point. "He served in all corners pretty well.
"I was never really under pressure the entire match on my serve and that was the key. I could stay calm even if I lost the second set.''
Davis Cup teammates David Nalbandian and Juan Martin del Potro of Argentina also advanced, both with comfortable straight-set wins.
The second-seeded Nalbandian beat Albert Montanes of Spain 6-4, 6-2, and the third-seeded Del Potro defeated George Bastl of Switzerland 6-2, 6-4.
Earlier, 42nd-ranked Simone Bolelli of Italy beat seventh-seeded Tomas Berdych of the Czech Republic 6-4, 7-5, lucky loser Andreas Beck of Germany defeated Nicolas Devilder of France 6-4, 6-4, and Philipp Kohlschreiber of Germany beat compatriot Denis Gremelmayr 6-4, 7-6 (5).
Nalbandian cruises to victory at Swiss Indoors
Juventus 95th Best Team In World!
WC Debate: Who Are The Greatest-Ever World Cup Nation?