The victory for the Canadian was his first over Federer in seven meetings and also snapped the Swiss maestro's 14-match winning streak.
Novak Djokovic made it an even worse day for the Swiss 17-time Grand Slam winner when he knocked out Andy Murray 7-5, 6-2 to book his semi-final place.
The Serbian world number one stays on track to maintain his top ranking with Federer less than 500 points behind him coming into Paris.
There are 1,000 points on offer at Bercy with a maximum 1,500 available for an unbeaten run to the title at the World Tour Finals.
Djokovic will next face Japan's Kei Nishikori who became the first Asian player to reach the World Tour Finals with a gutsy 3-6, 7-6 (7/5), 6-4 win over Spanish fourth seed David Ferrer.
"I knew before the match there was going to be a lot of long rallies and he's a player who plays well on all surfaces but I'm very happy and hope to continue my run here," said Djokovic who recently became a father.
"I'm in the semi-finals now and will just concentrate on tomorrow (Saturday). I'm here to focus on my tennis and then get back to my family as soon as possible." he added.
Winner of six ATP titles, including in Washington this year, Raonic must claim the Paris title to guarantee his place in London for the eight-man season finals.
In a match dominated by serve, Raonic took the first set in a tie-break before forcing the only break of the match at 5-5 in the second before closing out the tie.
Firing down 21 aces, Raonic always had his illustrious opponent under pressure and served out the match in just over 90 minutes.
"I played well throughout the match and served really well so it's a great victory," said Raonic, who now faces Tomas Berdych in the semi-finals.
"Considering all the circumstances around it, I think this was the biggest win for me." Raonic created the only break point of the first set at 3-2 but Federer was up to the task and held.
Booming first serves from both players dominated affairs and there were 18 aces in the opening set, with Raonic bombing down 11, the last of which painted the line as he claimed the set in just under an hour.