Sharapova, playing her third tournament after a 15-months' long drug suspension, beat Christina McHale in the first round of the Italian Open in Rome.
Should the 30-year-old three-times Rome champion, ranked 211 in the world, reach the semifinals, she would nearly certainly earn an automatic Wimbledon main draw slot ahead of the May 22 rankings cut-off date.
The two-time French Open victor had hoped to build up enough ranking points to automatically qualify for the Roland Garros event, which begins on May 22, but defeat to Kiki Mladenovic in the semifinal of the Stuttgart Open in April left her fate in the hands of the French Tennis Federation.
Sharapova is still waiting to hear if she will receive a wild card entry into Roland Garros starting a week from Sunday; that news will come on Tuesday, when she is otherwise engaged laying her second-round match.
The five-times Grand Slam victor was banned for two years for using meldonium, but the penalty was reduced to 15 months on appeal by the Court of Arbitration for Sport which ruled she was not an intentional doper.
Tomas Berdych, the number 12, defeated German Mischa Zverev 7-6 (9-7), 6-4; Jan-Lennard Struff put out Australian Bernard Tomic 6-7 (6-8), 6-1, 6-4.
It is a key preparation event for the French Open, the clay court Grand Slam, which begins on May 28 at Roland Garros in Paris.
Sharapova was leading 4-6, 6-3, 2-1 when she called it quits after Lucic-Baroni held serve. "And, you know, I play tennis for a lot of things, and those are just not them anymore".
American Sam Querrey dispatched French 11th seed Lucas Pouille, 7-6, 7-6.
Many players believed Sharapova should have had to start in bottom-rung tournaments to improve her ranking, rather than receive free passes into events on the main tour.
This is the fourth match scheduled on the day but the first match scheduled for the evening session on the Centre Court at not before 7:30 pm local time, and the victor of this match will face top seed Angelique Kerber or a qualifier in 2014 French Open semifinalist Andrea Petkovic or Anett Kontaveit.
Still, there were signs of rustiness, like when Sharapova hit a first serve into the red clay before the net while attempting to close out the match.
Since her return, Sharapova has gone 5-2 - the two losses coming against two of her most vocal critics, Mladenovic and Eugenie Bouchard.