The British number one, who is attempting to qualify for the ATP Tour Finals in London, dropped the opener against the South African before fighting back to win 6-7 6-4 6-4.
Murray started strongly by striking in Anderson's opening service game but his opponent hit back with two breaks of his own to seize control.
The British number one responded by prevailing in a 13-minute game to break back, but it was Anderson who dominated a tie-break to edge into a one-set advantage.
The pair exchanged breaks at the start of the second but Murray struck again in the ninth to take the last-eight contest into a decider.
The Scot continued his momentum at the beginning of the third by taking a 2-0 lead before giving himself the opportunity to serve for the match at 5-4.