The world number one won the contest 7-5 6-3 in one hour and 28 minutes, but missed on six break points in the opening set and went down a break in the second against the German, who replaced injured Frenchman Jeremy Chardy for the clash.
"I was well-prepared to play Becker instead of Chardy," said Federer.
"You have to keep the game of these guys in mind. You don't play them that much but you need to know how they play.
"I don't know exactly how I changed it around. He broke me at 2-3 but I was able to get it straight back. It all went so fast at the end, but the first set was really tough."