The Johannesburg-born 26-year-old, who had never previously made the last 16 of a Grand Slam, dispatched the 22nd seed 6-4 3-6 6-4 6-7 2-6 on Friday evening.
"I was very emotional at the end," said Anderson. "I tried my best to win it at 5-2, it's a little easier than having to serve it out, I was pretty happy to see that forehand go by.
"[Getting to the fourth round of a Grand Slam] was definitely on my mind, I had fallen short in the third round four times I think. just tried to focus on what I was doing out there in terms of the game I was trying to play.
"It really meant a lot to me, getting through that match, especially a five-set match. It would definitely be up there in one of the most important and best matches I've played."