The 19-year-old needed two hours and six minutes to become the first teen to upset a top 5 opponent since 18-year-old Borna Coric beat Andy Murray in Dubai last year.
"I feel pretty good," Zverev said. "I played very good and served well once again. I think that helped me a little bit and I played well in the important moments. It's unbelievable to get a win against Roger, especially on grass."
Zverev, ranked No. 38 in the world, will face fellow German countryman Florian Mayer on Sunday.
Zverev lost just four points on serve in the first set while hitting 14 winners. In the second set, No. 3 Federer smacked two aces on his way to a 4-3 lead and broke a 5-5 tie with a drop shot as Zverev slipped at the baseline. Zverev recovered and took the match in the third set after breaking Federer at 4-2 and then holding on for the win. He had 39 winners, including eight aces.
No. 192 Mayer stopped Dominic Thiem 6-3, 6-4 in just over an hour. He faced only one break point.
"I think it's going to be a very tough match," Mayer said. "(Zverev's) a young, upcoming German player. He will be in the top 10 for sure in the future. I think he will be the favorite. Maybe the pressure is a little bit more on his side to win his first title. We will see. I will give my best and then we will see what happens."
Andy Murray held off Marin Cilic 6-3, 4-6, 6-3 in around two hours to advance to his fifth final at The Queen's Club in London.
Murray can be the first to win five titles since the tournament was established in 1890. He won in 2009, '11, '13 and '15.
"A lot of great players have played here over the years, and winning any tournament a few times is hard obviously," Murray said. "But this one in particular has always got a very strong field. I'm glad I have given myself the opportunity to try and win again tomorrow."
World No. 2 Murray only lost four first-serve points in controlling the first set. Cilic rallied in the second set went up 5-3 and forced Murray to sail a long forehand to tie the match. Murray, however, went up 4-1 and finished off Cilic by winning all 17 of his first serves.
Murray will face No. 3 seed Milos Raonic in Sunday's final. The Canadian needed just over an hour to get past Australian Bernard Tomic 6-4, 6-4. Raonic broke Tomic at 4-4 in the first set and again at 3-2 in the second to cruise to the win.
Madison Keys won a tough match against Carla Suarez Navarro 3-6, 6-3, 7-6(3) in Birmingham, England to reach the final.
Early on, it seemed like Suarez Navarro's match to win after an easy win in the first set. However, Keys rebounded to tie the match. In the third, Keys took a 3-2 advantage by breaking Suarez Navarro but hit a bad shot into the net to force a tie-break. There, Keys recovered to take the match.
"I'm really excited right now, but I'm also trying to stay focused on the final," Keys said. "I haven't even really put a ton of thought of being in the top 10. That will definitely sink in after the tournament. I'm happy with it, but more focused on wanting to win the final tomorrow."
Keys will face Barbora Strycova, who came back to beat CoCo Vandeweghe 2-6, 6-4, 6-3 in the other semifinal.
Vandeweghe jumped out to a 5-0 lead and took the first set but Strycova recovered to stop Vandeweghe.