Federer, an eight-time victor of his hometown event, was far from his best but managed to come back from a break down to win the first set in a tiebreaker on Friday.
Copil stormed out of the blocks in the second set, racing into a 3-0 lead before Federer got on the scoreboard, but the Swiss kept a level head to reel his opponent back in before breaking serve to take a 5-4 lead in the second set.
Meanwhile, Kevin Anderson booked his place in the season-ending ATP finals by winning the Erste Bank Open in Vienna.
Copil comprehensively claimed the opener to tee up an upset, and although Zverev snatched the second in a tie-break the Romanian qualifier recovered to secure a shock victory.
"It's been a magical week for me, a dream run for me", Federer said before attending his traditional post-final pizza party with the ballkids.
Brothers killed in synagogue shooting were 'inseparable'
Authorities have said Bowers used an AR-15 rifle and three handguns in the attack, which also injured several police officers. The mayor said on Sunday that keeping guns out of the hands of irrational people was a better way to prevent violence.
The top seed grabbed a second break, with the Swiss serving out victory a game later on his first match point.
Only Connors (109) has won more titles than Federer, however, at 37 years old, the world No 3 does not think he has the time remaining to become the most decorated player of the professional era.
Federer's semifinals opponent will be seventh-seeded Russian Daniil Medvedev, a 6-4, 3-6, 6-3 victor over Greek fourth seed Stefanos Tsitsipas in the day's final match.
The win was a reversal of the first main draw match of Zverev's career when, as a 16-year-old wild card, he lost to Bautista Agut in Hamburg in 2013. He then dropped his serve to love, and let another match point slip in Medvedev's next service game by netting a backhand. He needed 44 minutes to claim the opening set but was brought back to level-pegging as Zverev won the second in a tiebreaker.
"I knew it was going to be hard".
Standing between Federer and what would be his ninth career title at his hometown tournament is the unfancied Copil, who beat world number six Marin Cilic earlier in the week.