Williams now has an 11-1 career record over Azarenka, and has won the last nine matches between the two.
"Maybe I'm doing the right things at the right time," said Williams, who also beat Azarenka to win the U.S. Open title before taking six weeks off.
Williams' win also prevented Azarenka from making sure early she would finish the year as No. 1, although the player from Belarus can secure that position with another victory in the round-robin portion of the tournament.
Williams, who is projected to finish the year at No. 3 no matter what, got her third win in three matches at the event when Azarenka served a double-fault. Azarenka also lost the first set on a double-fault and finished with nine.
I just was able to play better than I did in my first couple of rounds," Williams said. "That was what i was going to have to do going up against the No. 1 player in the world."
Azarenka squandered a 3-0 lead in the second set as Williams won the next four games to battle back.
"i had a lot of opportunities and I didn't use them. I couldn't keep up," Azarenka said. "It's one of these days, I am a little said because I broke her a lot and I had a lot of chances."
China's Li Na beat Angelique Kerber of Germany 6-4, 6-3 in another Red Group match to retain a slim chance of advancing.
Li's first win in two round-robin matches means she can still reach the semifinals, depending on other results in her Red Group.
The fifth-ranked Kerber, making her first appearance in the season finale, bowed out losing all three of her matches but played some outstanding tennis at times. She played more than three hours late Wednesday in a three-set loss to Azarenka.
The tournament brings together the top eight players in the world. They are split into two groups and two from each advance to the semifinals.
Williams and Maria Sharapova, who didn't play Thursday, have already qualified for the last four.
Sharapova, the French Open champion, could still take the No. 1 ranking away from Azarenka but has to win the tournament undefeated — and hope Azarenka loses against Li on Friday.
Williams has dominated the second part of the season, winning Wimbledon and the U.S. Open and also capturing th Olympic gold medal. She has won 46 of her last 48 matches.
Williams also beat Azarenka in the semifinals of Wimbledon and the Olympics.Suggest a correction