The 20-time Grand Slam champion, who will be confirmed as world number one on Monday, beat world number five Dimitrov 6-2-6-2 for his 97th title.
The Bulgarian was broken in the fifth game, then on three more occasions as Federer won comfortably in 55 minutes.
"The goal at start of week was to make it to the semi-finals," Federer said.
"It's unbelievable to be number one again. This is one of the best weeks of my life."
"I had a great first match and a great last match. In between it was a battle, it was nerve-wracking, but I was able to manage my nerves and the expectations."
It is the third time Switzerland's Federer has won the Rotterdam event, and it takes him to within 12 titles of American Jimmy Connors, who holds the Open-era record of 109.
Federer first became world number one in February 2004, but has not topped the rankings since October 2012 and slipped to a low of 17th in January 2017.
That was after he spent six months out recovering from an operation on a knee problem.
However, he has since won eight titles, including Wimbledon last year and two Australian Opens.
At 36, he eclipses the record held by Serena Williams, who was 35 when she lost her women's number one ranking in May 2017.