The Russian, making her debut appearance in the tournament and her first on the WTA Tour since losing in the Australian Open final to Serena Williams, fell 2-0 behind in the first set and faced two break points on her next service game against Rogers.
But that was as good as it got for the American as Sharapova battled to hold and immediately claimed the break back before eventually triumphing 6-4 6-1 after an hour and 14 minutes.
“I’ve been in many different situations in my career, and when you’re down, you have to change a few things and stay positive,” Sharapova told the WTA Tour website.
“You just have to concentrate on one point at a time instead of the bigger result, and as the match went on I definitely felt more and more comfortable out there.”
Rogers’ compatriot Madison Brengle, the eighth seed, was a surprise casualty despite winning the first set against Spain’s Maria-Teresa Torro-Flor, who hit back to triumph 2-6 7-5 7-5.
Monica Puig of Puerto Rico came through 6-4 3-6 6-3 against Czech Tereza Smitkova, while there were comfortable wins for Bethanie Mattek-Sands and Mirjana Lucic-Baroni.
In the men’s event, the four seeds in the tournament all progressed to the last 16.
Fourth-seed Kevin Anderson cruised to a 6-1 6-2 victory over Dustin Brown, while Alexandr Dolgopolov, seeded fifth, saw off Sam Groth 6-3 4-6 6-0.
Eighth-seed Benjamin Becker toppled Tobias Kamke 7-6 (7-4) 6-2 and Santiago Giraldo came through a tight first set before defeating qualifier Austin Krajicek 7-6 (10-8) 6-1.
Marinko Matosevic and Dusan Lajovic were also first-round winners.