Swiss Federer, 33, beat the Canadian, 24, 6-4 6-7 (2-7) 6-4 on Pat Rafter Arena to clinch his 83rd career title.
The world number two becomes the third man, after Jimmy Connors and Ivan Lendl, to secure 1,000 ATP wins.
"I've played a lot of tennis over the years so to get to 1,000 wins means a lot to me," said Federer.
"It's a special moment, no doubt about that. I will never forget this match."
The 17-time Grand Slam champion, who lost to Lleyton Hewitt in last year's Brisbane final, is the first player since Lendl in 1992 to reach the milestone.
He has now won at least one tournament every year since 2001, an unbroken run spanning 15 seasons.
Federer now heads to Melbourne to begin preparations for the Australian Open, which begins on 19 January and is a Grand Slam he has won four times.
The Swiss has been in fine form in Brisbane, brushing aside Australian qualifier James Duckworth in 39 minutes and then beating Bulgarian Grigor Dimitrov in 53 minutes to reach the final.
Federer began strongly in final, breaking Raonic's serve in the third game before going on to take the set 6-4.
He 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 early in the third but Raonic failed to capitalise and the Swiss recovered to break in the 10th game and secure victory in two hours and 13 minutes.
Raonic said: "We all know today is a significant milestone for Roger. When we came out and they listed all the things you've won, I thought you must have been playing for 2,000 wins."
Top seed Roger Federer secured the 1,000th victory of his career as he beat Milos Raonic to win the Brisbane International title.