Australian Open champion Keys made 12 double faults, four times more than her opponent, as Anisimova bounced back from a first-set stumble to get her first win in the WTA Finals.
Anisimova was the first to hold her serve after the match started with four straight breaks, but the 24-year-old conceded another break as Keys took a 5-4 lead.
World number seven Keys won the first set with forceful serves and built a 2-0 lead in the second, but her struggles with double faults and unforced errors allowed Anisimova to get a break back and make it 3-3.
Fourth seed Anisimova broke again, fooling Keys with her well-timed forehand, and won five straight games to take the second set.
Keys looked exhausted as Anisimova, growing in confidence and finding success with cross-court shots, took just 34 minutes to win the third set.
"It was quite a battle out there. Just really happy with the way I was able to turn around in the second set and turn that frown upside down," said Anisimova, who was the runner-up in Wimbledon and the US Open this year.
Elena Rybakina will face Keys in her last round-robin match after the Kazakh beat Iga Swiatek to secure her place in the semis, while Swiatek - who beat Keys on Saturday - takes on Anisimova.
    