The pair played out a tight encounter in the first set, but the Swiss managed to carve out a break-point opportunity and produced the quality he needed to take the advantage.
Goffin responded as he put Federer on the back foot, but the 34-year-old fended off two break chances for the Belgian to hold serve and take the set 6-3.
The 24-year-old rallied in the second set and put the Swiss's serve under pressure, and this time he managed to convert his break opportunities to level the match by taking the set 6-3.
Federer found his best form in the decider and dominated the court with his forehand, hitting several winners to overwhelm Goffin to take the set 6-1, sealing his place in the last four.
The Swiss will play Jack Sock in the semi-finals of the tournament.