The 25-year-old Swiss weathered an early storm from the 10th seed but found his rhythm in the second set and then powered his way to victory as Gonzalez folded under the pressure.
It was Federer's fourth Masters title of the year and the 12th of his career, taking him one clear of Pete Sampras into second place behind Andre Agassi who heads the all-time list with 17.
The victory, Federer's first in Madrid, extended his winning streak to 19 matches and took his tally of victories for the year to 82. He is the first player since Ivan Lendl in 1982 to win 80 matches two years in a row.
"I missed the last two editions because of fatigue and injury and it was great to come here again and win the tournament," said Federer after raising the winner's shield.
"It is a great day in my career."
The Swiss had won all seven of his previous encounters with Gonzalez but he looked a little rusty at the start of the opening set and made some uncharacteristic unforced errors.
Gonzalez, in his first Masters final, still appeared to be on a high after his emphatic victory over Tomas Berdych on Saturday as he put Federer under pressure with some pounding forehands but it was not enough to break the Federer serve.
Federer, who had crushed fourth seed David Nalbandian in his semi-final, then began his customary push at the business end of the set, breaking at 6-5 up to take the opener.
Having drawn the sting from Gonzalez, Federer stepped up another gear in the second set, breaking in the fourth game to go 3-1 up.
The Swiss hit the lines and gave the Chilean no chance as he rattled through the next three games to take the set in just 26 minutes.
He picked up where he had left off at the start of the third, breaking in the first and third games to turn the screw on the Chilean.
Federer raced to a 5-0 lead and although Gonzalez mounted a brief rearguard action in the final game the Chilean could do nothing to prevent a whitewash in the final set.
More from rediff