The 33-year-old Federer, who advanced to the semis with a straight set win over Scotland's Andy Murray, has now won all six career meetings against Raonic.
Federer's victory sets up the battle of the 30-somethings as he will now face Spaniard David Ferrer in Sunday's final. Ferrer, 32, brushed aside Julien Benneteau 6-3, 6-2 earlier Saturday.
Federer has also never lost to the sixth-seeded Ferrer in 15 meetings, the last coming a week ago in the Toronto quarter-finals.
Federer won the first set against Raonic with four love games, but the pace slowed in the second as the pair stayed on serve. Federer broke for 5-3 and served it out a game later after just 68 minutes.
"Breaking in the first game was crucial," said Federer. "It was more of a fight in the second set.
"I'm very happy with this match.
"I'm happy, but the final is tomorrow and I hope to do it again. This time last year I came to the event with no expectations. But many things have changed since then.
"I'm happy the results show it. It's much more fun playing this way. I've had a complete season so far and I hope to win another title."
Federer stands a win away from his 80th career singles title and leads the ATP with 48 match wins this season. The Swiss owns titles from Dubai and Halle this season and will be playing in his eighth final.
Spain's Ferrer, seeded sixth, schooled Benneteau as the Frenchman played in his first semi-final at the elite Masters 1000 level.
He needed just 71 minutes to seal the victory and give himself a shot at adding a second title of 2014 to the trophy he lifted in Buenos Aires.
The Spaniard also reached the final at Hamburg this year, but he last played a Masters event final in November, when he lost to Novak Djokovic at Paris Bercy.
Ferrer will aim for his 22nd career trophy on Sunday.
"I played very consistently, and got the break, then I could play with calm," he said, calling the match "maybe my best of the week".
"I played without a lot of mistakes but it was difficult to return sometimes."
Ferrer took a 4-1 lead in the second set and while Benneteau put up a last-gasp fight he was able to wait for the exhausted Frenchman to finally make an error on the fifth match point.
"I'm going step by step," Ferrer said. "Tennis is always a surprise. When I looked in my quarter of the draw and saw Novak Djokovic and Jo-Wilfried Tsonga there, I knew it was not easy.
"But as they lost, I took my chance and got into the final. I'm trying to improve my game every day. Watching the top 10 guys is a great inspiration to improve also."