"It was close and it could have gone either way naturally but I am happy that I have got it and got back to world No. 1 next Monday".
Federer was pushed all the way by the fourth-seeded Kyrgios, who fired down 23 aces in another battling performance at the German grasscourt tournament.
Now holding a 50-point lead over the Spaniard, Federer could increase it by a further 100 points if he defeats Canada's Milos Raonic in the final on Sunday. "The margins were very small, and there were very few chances and I'm glad in the tiebreakers I stepped up".
The 20-time Grand Slam champion had already secured his return to number one in the world rankings with victory over Nick Kyrgios in the semi-final.
He takes the honour back from Rafael Nadal for the second time this season.
"Maybe I was a bit better on the big points".
The Swiss tennis player was beaten in a tiebreak in the first set, 6-7 (2) but came back fighting to win the second and third sets, 6-2 and 7-6 (5) in just an hour and 51 minutes.
A double fault from the Canadian followed by a return victor from the Swiss set up three match points, with Federer needing only his first as Raonic netted a return.
"I thought it was the tough match that I expected against Nick".
February 16, 2018 Roger Federer of Switzerland celebrates after defeating Robin Haase of the Netherlands. I'm defending a title there - like I am at Wimbledon. I have a quiet pre-tournament week, not many things going on, which is fine.
Federer also sat out the clay-court season in 2017 but previous year lost on his return in Stuttgart before going on to win the Gerry Weber Open in Halle and claim an eighth Wimbledon title. "I'm just concentrating on the job to hand, trying to do it well".