The world number two defeated the US Open champion in straight sets to reach his third consecutive final at the season-ending tournament.
"It was a special match," said Federer. "It was the third time in London this year for the two of us and the crowd was electric. You really made it for both of us.
"I have been around the block a few times and that was something. I can't thank you enough for that. You can't tire of nights like this."
Federer will now meet world number one Novak Djokovic in Monday's final.