The Russian overcame Williams in straight sets to reach the fourth round of the Australian Open on Friday evening.
Sharapova, who won her first two matches in Melbourne without dropping a single game, had been 6-1 5-1 ahead against Williams, before she eventually prevailed 6-1 6-3.
"When the draw first came out that was the matchup that we were both looking forward to," said Sharapova. "She's always a very tough opponent to play, I was just really determined out there.
"I was up 5-1 then made a few more errors than I would have liked to, so I was really happy to just serve it out."
Sharapova and Williams have now contested 10 matches against each other, winning five apiece.