The Swiss world number two went into his semifinal on Saturday as the overwhelming favourite to ease past the Belgian on his way to a record seventh title at the season finale in London.
Federer had never lost to his opponent in six matches and the contest appeared to be going to script when the Swiss easily won the first set before a rejuvenated Goffin turned the tide to take the match 2-6, 6-3, 6-4.
"It's been an amazing year for me," said a disappointed Federer, who said he had not found his best form in London.
"Been so happy that I was playing at this level from the beginning till basically the end, till today. So it's been great.
"Really enjoyed myself in the process. I felt I was playing in a way that I also like, playing forward, playing attacking tennis. I wish I could have done that a little bit more today. It's kind of disappointing to finish on this note.
"But whatever happened today is less important than if I look at the entire season. With that season, I'm extremely happy."
Federer astonished the tennis world by winning the Australian Open in his first tournament back after a six-month injury layoff, beating his long-time rival Rafael Nadal in a gripping five-set final.
He followed that up with a record eighth Wimbledon crown, winning a Tour-leading seven titles in all and losing just five matches in the whole of 2017.
"I'm just looking forward to some time off now, away from the match court, away from the pressure, then hopefully play well in Australia," said the 36-year-old. "I can't wait to play there again. I had the best time of my life this year, so can't wait to go back there."
Clean bill of health
Federer reported a clean bill of health, saying he had no problem with the knee injury that cut short his 2016 campaign and that he had recovered from a back problem that flared up in Montreal earlier in the season.
"So I'm actually very relieved that I was able to finish strong now in Shanghai, Laver Cup, Basel, now here again as well. It shows that things are in the past now," the 19-time Grand Slam champion added.
"It's good to know that I can bounce back and get my confidence back. Other than that, I didn't have many problems... So considering how last year went, this year was perfect."
Federer was quizzed about the chances of the other members of the "Big Four" next year, with Novak Djokovic and Andy Murray both missing from the ATP Finals and Nadal forced to pull out after his first round-robin match at the London's O2 Arena.
"You've always got to expect a slow process," he said. "Then if it goes fast, that's great. Look, we all had to take time off. I didn't choose to take the time off last year. You make me look like a genius sometimes.
"You take time off, you come back, you're good again. That's not how it goes. I think if we could have played, we all would have played."
He said he expected the likes of Grand Slam winners Djokovic, Murray and Stan Wawrinka to be competing at the sharp end of tournaments again but warned that the old guard would face a tough challenge from a thrusting set of younger players.
"You mix them together with the new guys from the World Tour Finals here who have just come off a great year, obviously are confident, want to stay in the top ten, want to make the World Tour Finals again.
"They are sort of weaving their way in. 'Not so fast, guys, we also want to make it.' You have the young guys coming through. I think it could be a very cool start to the year, which I'm really looking forward to."