Sharapova reached her first quarter-final since returning from a drugs ban in Madrid last week
Sharapova, who reached her first quarter-final since returning from her drugs ban in Madrid last week, outlasted the Australian 7-5 3-6 6-2 in a match lasting two and a half hours.
Sharapova, who is chasing a fourth career Italian Open title, told wtatour.com: "This tournament has been special in my career, and brought me some great matches.
"I'm a little bit more relieved this year, and just playing and not worrying about anything else, which is nice."
Former world number one Angelique Kerber beat lucky loser Zarina Diyas of Kazakhstan 6-2 7-6 (8/6) while Daria Kasatkina was another seed safely through as she beat Ajla Tomljanovic 6-0 6-4.
Timea Babos, Irina-Camelia Begu and Russian veteran Svetlana Kuznetsova were among other first-round winners but Kiki Bertens, who reached the final in Madrid last week, lost 6-2 4-6 6-3 to Maria Sakkari of Greece.
In two second-round matches, fourth seed Elina Svitolina beat Petra Martic 6-1 6-2 and fifth seed Jelena Ostapenko beat Shuai Zhang 6-2 7-5.