Tsitsipas had to keep his nerve at the key moments to beat Federer 6-3, 6-4, saving 11 of 12 break points along the way. He also took advantage of an error-filled performance from Federer, who continually put his opponent under pressure only to come up short when it mattered.
"I'm proud of myself, how hard I fought today, how concentrated I stayed in the break points," said Tsitsipas, 21, who reached the biggest final of his career. "Didn't crack under pressure. I was very composed and very mature in my decisions."
In the evening match, Zverev double-faulted on set point to hand Thiem a 1-0 lead and was then broken for the second time to make it 4-2 in the second set.
Thiem saved two break points in the next game, Zverev held, and Thiem served out the match, clinching the victory with a forehand winner on his first match point.
Zverev was trying to repeat last year's title win but couldn't convert any of the four break points he forced against Thiem. As he sat down for the changeover after his double-fault to end the first set, he slammed his racket so hard, it bounced along the court and came to rest behind the baseline.
Tsitsipas, who is making his first appearance at the event, saved all six break points he faced against Federer in the first set. That included two at 5-3, when he needed seven set points before finally winning a marathon game.
He broke again for a 2-1 lead in the second, then saved three break points from 0-40 in the next game before Federer finally converted his fourth to level the set.
But Tsitsipas broke again with a forehand winner and then saved two more break points from 15-40 down when serving for the match at 5-4.
He didn't give the 38-year-old Federer any more chances for a comeback, serving out the match with an ace.
"No doubt I had my chances," Federer said. "I'm just frustrated I couldn't play better. And when I did and fought my way back, I threw it away again."
The 17-year age gap between the two players was the largest in the history of the tournament.
For Federer, it was a surprisingly erratic performance after he played near-flawless tennis to beat Djokovic in straight sets Thursday to reach the semifinals.
He finished that match with five unforced errors - including two double-faults - but had 26 in this match.
Federer was especially unhappy with the service break in the first set, when he missed two fairly routine overheads to gift his opponent the early lead.
"Getting broken with missing two smashes in one game, that hasn't happened in a long, long time. Or ever," Federer said. "So that was tough."
Reaching the final is another milestone in a breakthrough season for Tsitsipas after he also beat Federer on the way to the Australian Open semifinals.
He is now 2-2 against Federer after losing to him in the Dubai final and Basel semifinals this year.
"I think I learned a lot of things from my Basel match against him," Tsitsipas said. "Once you get the patterns, once you analyze a bit the game better and know what to expect next time, you always feel and you always want to put yourself in the state of mind where you think that you can always do better."
Thiem, a two-time runner-up at the French Open, beat both Federer and Djokovic in the group phase to reach the semis.