The 33-year-old beat Raonic, 6-4, 6-7 (2), 6-4 on Patrick Rafter Arena to clinch his 83rd career title and 1000 wins, the third man to do so after American Jimmy Connors and Czechoslovakian-turned American Ivan Lendl.
Federer now heads to Melbourne to begin preparations for the Australian Open, which begins Jan 19.
The Swiss maestro has been in prime form here, brushing aside Australian qualifier James Duckworth in 39 minutes and then beating Bulgarian Grigor Dimitrov in 53 minutes to reach the final.
The 17-time Grand Slam champion began the final strongly, breaking Raonic’s serve in the third game before going on to take the set 6-4.
The Swiss broke in the opening game of the second set, but Raonic broke back for 2-2 and then dominated the tie-break, winning seven successive points to seal the set and level the match.
Federer was under pressure in the third round but cameback to break in the tenth game and win in two hours and 13 minutes.