The 17-time Grand Slam winner had blown away world number one Novak Djokovic in the semi-finals but he found a stubborn opponent in Simon at Shanghai's Qizhong Tennis Centre.
And the 33-year-old needed two tie-breaks and saved set points in each set before making it back-to-back Masters victories following his win in Cincinnati in August.
"I feel unbelievable prestige to win this event," Federer said.
"Especially putting my hands on the trophy for the first time is a good feeling, I must say. I'm very happy with the way I'm playing. Overall I'm just extremely happy right now."
More From This Section
Federer changed tactics midway through the first set, tentatively approaching the net in a bid to regain the initiative.
But Simon was unfazed, slamming his shots with power when Federer was in a forward position and forcing him to reconsider the tactic.
Shouts of "Come on Roger" were being drowned out by "Allez Gilles!" as the crowd sensed an upset could be on the cards.
But as Simon served for the set at 5-4, Federer broke back and he was in the ascendancy as he earned two break points in Simon's next service game.
The pair were evenly matched during a tight tie-break.