The 35-year-old Swiss star warmed up for Wimbledon, which starts in eight days, with a 6-1, 6-3 victory over fourth-seeded Zverev of Germany to claim his 92nd career title.
Federer won 26 of 28 of his first-serve points, clinching his 16th grass-court title after only 53 minutes with a backhand volley winner.
"I played unbelievably well. I felt good and never let up," Federer, playing in his 140th career final, said afterward. "It was my best game this week. Nearly everything worked out for me."
Federer joins Rafael Nadal as the only two men in the Open Era who have won a tournament more than eight times. Nadal has won 10 Monte-Carlo Rolex Masters, Barcelona Open Banc Sabadell and French Open titles.
Federer, who is No. 5 in the world, improves to 4-0 in title matches this season, having won the Australian Open, the BNP Paribas Open in Indian Wells and the Miami Open. He and Nadal are now tied for the most wins this season.
"It's great to get off to a good start in the finals and then remind yourself that you've been playing good tennis all week," said Federer, who dropped just nine points on his serve. "You start swinging freely, things start clicking, you realize your opponent is under pressure and you keep pressuring him.
"I'm like on cloud nine right now after the ninth win here in Halle. It's a wonderful feeling to win here again because I'm not sure if I'll ever get a chance to win this again so it's important to enjoy this one."
Federer put aside any question about his long layoff affecting his grass-court season. He took off 10 weeks after winning the Miami title on April 2.
Federer, who won the Australian Open in January for his 18th Grand Slam title, decided to skip the clay-court season, including the French Open, to prepare for the grass and hard-court seasons, with his eye on Wimbledon, where he is a seven-time champion.
After losing in his return on June 14 to Tommy Haas in Stuttgart, Germany, Federer checked off five consecutive victories. The Stuttgart defeat was the first time Federer had lost his opening match at a grass-court tournament since 2002 Wimbledon.
"I was doubting myself a little bit, I must admit, because losing (in the opening) round for the first time in 15 years on grass was always going to shake me a little bit and it did," Federer said. "So I'm happy to react right away and let that be forgotten and actually move on and remind myself I actually can play well on grass. It's a boost for me personally, with my confidence, knowing that my body is in good shape. Mentally, I'm fresh again and I've gotten used to match play."
The 20-year-old Zverev also had been 3-0 in title matches this season before Sunday, winning in Montpellier, Munich and Rome, where he beat world No. 2 Novak Djokovic for his first ATP World Tour Masters 1000 title. Zverev also beat Federer only a year ago in Halle, outlasting Federer in a three-set semifinal to reach the 2016 final.
But Zverev, ranked No. 12, had no answer for Federer's aggressive play and near perfect execution.
"I think Roger is playing really, really well," Zverev said. "I think going into Wimbledon he's going to be probably the favorite to win the whole thing. So credits to him, he played an unbelievable match. Of course I could have played better but he didn't really let me play my best tennis. He messed with the ball a lot. He played very aggressive. ... He deserved to win."
"It was a very good week for me again making the finals here. Of course I'm upset with the loss, but going into Wimbledon I feel very confident I can make a deep run there."
Federer's 92nd title moves him to within two of Ivan Lendl for second on the Open Era titles list.