The 20-year-old won the opening set before Sharapova gradually ground her down to win the second round clash 6-7 6-3 6-4.
Watson, the world number 78, looked on course to shock her illustrious opponent when she broke Sharapova to send the opening set to a tie-break, in which she came from 3-0 down to win 9-7.
But the second-seeded Sharapova dug in and showed the grit that has taken her to four Grand Slam titles.
Despite hitting a disastrous 14 double faults in, the Russian preyed on the vulnerable Watson serve which she broke eight times.
"I didn't play my best tennis but I ended up winning the match and I have a chance of going out tomorrow and playing better," said Sharapova.
"I hope to be the champion again, I have such good memories of this court," Sharapova added. "It was the first major tournament I won after my shoulder surgery."
Watson said: "I maybe didn’t take advantage of winning that close first set and trying to get ahead quick in the second. But I’ve gained more experience today, I know what I need to do, I know where I stand, I know what I need to improve."
The result nonetheless represents a successful run for the defeated Watson, who upset Sabine Lisicki in the first round before pushing the Russian to a third set.
Sharapova will play Lucie Safarova in the last 16 after the Czech defeated her compatriot Klara Zakopalova via walkover.
Earlier, world number one Victoria Azarenka eased past Tamira Paszek 6-1 6-1 and former French Open champion Li Na shrugged off a nasty cough to beat Russia's Anastasia Pavlyuchenkova 7-5 4-6 6-2, but Petra Kvitova fell 6-4 6-4 to Croatia's Petra Martic.