The world No.3 overcame the Spaniard, ranked one place above him on the ATP rankings, in the first set, a tie-breaker, in 72 minutes after saving two set points and kept his nerve to seal the game by winning the second set in another tie-breaker.
Thiem is now 2-0 in round-robin play in Group London 2020 and has improved his chances of reaching the semi-finals for the second successive year.
The Austrian will face Andrey Rublev in his final round robin match on Thursday and look to earn his 300th tour-level win.
"The match was at a very high level with all strokes. I am very happy with the way I served, because most of the time when I get the first serve in, I am on the offence and I have a good percentage to win the point," said Thiem after the match.
"When I was in difficult situations like the first-set tie-break… the serve helped me a lot. I think it is maybe the most important stroke in indoor tennis. I am very happy that it worked well," he added.
Earlier on Tuesday, Danii Medvedev defeated Alexander Zverev in straight sets.
Russia's Medvedev won 6-3, 6-4 against his German opponent to join Novak Djokovic on top of the Group Tokyo 1970.
Zverev hit four double faults in his first two service games, and never found rhythm with his second serve going. Medvedev won 79 per cent of his second-serve return points (15/19) on way to his one-hour, 29-minute victory.
Medvedev is high on confidence having beaten Zverev in the Rolex Paris Masters Final a few days back.
"Confidence is the key, for sure. Winning an [ATP] Masters  always helps the confidence," Medvedev said.
"I knew that I can play good. It was a little bit shaky from both of us in the beginning from one [point] of view, but from the other [point] of view, I think there were some unbelievable points. To be honest, the intensity of the match was one of the most [intense] I had in my career."
Medvedev is the first Russian to compete at the ATP Finals in consecutive seasons since Nikolay Davydenko made five straight appearances from 2005 to 2009.