The 18-time grand slam champion, whose last title at Halle was in 2015, skipped the entire clay court season after winning the Australian Open and claiming titles at Indian Wells and Miami this year, to prepare for grass.
France's Richard Gasquet is also through after a 6-1 3-6 6-1 victory over Robin Haase.
Apart from that, the youngster has also defeated Federer at the Halle Open past year in the semi-finals which was also his only win against him.
Roger Federer reflected on a "difficult year" after beating Alexander Zverev to win a ninth Halle title as he provided the flawless platform to build upon for Wimbledon.
"I don't really know what to say, that was fantastic", Zverev said.
Federer, 35, has yet to drop a set after three matches in Halle this week while his win on Friday took his head-to-head record against Mayer to 8-0, with five of those wins coming on grass.
There was hardly an area of the game Federer did not dominate for extended periods, although the rallies rarely went longer than a few shots.
The duo have faced each other twice with both players having one win apiece. In the victory, Zverev won 82 percent of his first serve points and 48 percent of his second serve points.
"It's tough to play against a friend like Lucie", Kvitova said. Inside a minute, Federer broke Zverev to love: the tennis equivalent of Anthony Joshua knocking out a young contender with the first punch of the fight. "Probably it's one of the dream finals of the tournament and I'm very much looking forward to it". I think I did it very well.