Win Tim took a late break in the deciding set.
Ten minutes later, having struggled for accuracy on first and second serves throughout, he failed to defend the fifth break point conceded in that game.
There still seemed plenty of time for 19-time Grand Slam champion Federer to re-assert his authority but Goffin stayed cool and his moment of truth arrived at 5-4 when he stepped up to serve for the biggest win of his career.
Federer, 36, went into the semi-final with a 6-0 record against Goffin, whose resistance appeared to have been broken after only seven minutes.
Goffin, the first Belgian singles player in the 48-year history of the ATP Finals to qualify for the season finale, could not hold his advantage, however, losing his serve in the worst possible fashion with a double fault and then an unforced error, before Dimitrov held for a 5-4 lead. I let him back into the game.
Both finalists were first-time qualifiers for the tournament and while many ticket holders might have booked them in anticipation of watching Roger Federer or Rafael Nadal, the two newcomers provided a fitting end to the ATP season.
The first game of this interesting encounter was already a classic, with Goffin having to fend off the merciless offense from Federer immediately from the first rally. "I'm just going to focus on what I can do and play hopefully the same game".
The Belgian opened the match well, acing Federer twice, but he threw away a game point allowing his opponent to swoop in and claim the first game easily. Sometimes not only that you have to fight yourself mentally, but you need to fight the demons from previous matches or your opponent.
Pete Sampras group: David Goffin bt Dominic Thiem 6-4, 6-1. He completed the job on serve to set up a meeting with Goffin on Sunday.
Both players started the final set with an exchange of service holds before Goffin unexpectedly made the first breakthrough in the third game.
Grigor Dimitrov will face Jack Sock in the second semi-final. The mistakes were starting to creep in as Sock pushed Dimitrov hard on the attack; forcing him wide off the court and then forcing a sprint with a slice drop shot. It was a very close match, which was predictable as Sock saved one match point to beat Dimitrov in 2015 Montreal, and four match points earlier this year in Indian Wells.
Dimitrov won his last two group matches for the loss of four games and continued in that vein against Sock, racing into a 4-0 lead.