The Swiss great will play Milos Raonic as he bids for his 18th grass-court title.
“It’s nice that it happened but I’ve other problems,” said Federer, playing his first tournament since March. “I hadn’t played in three months, it’s on grass, it’s fast and difficult to get so far here. Still, I’m delighted to have achieved it.”
Raonic earlier hit 19 aces and saved the only break point he faced as he defeated defending champion Lucas Pouille 6-4, 7-6 (3) in the other semifinal.
Federer was pushed all the way by the fourth-seeded Kyrgios, who had 23 aces.
Kyrgios forced a mini-break in the deciding tiebreak, but Federer remained steady and sent a short backhand past the Australian on his first match point to clinch the win.
Federer, in his first tournament since March, was trailing Nadal by 100 points at the start of the week and is guaranteed of taking the top spot on Monday regardless of how Sunday’s final goes.
It will be Raonic’s first final since the 2017 Istanbul Open. The Canadian won his last title at the 2016 Brisbane International.