American legend Williams announced her withdrawal less than one hour before her second round match against Bulgarian Tsvetana Pironkova, citing an Achilles tendon injury as the reason.
“The Achilles didn't have enough time to heal after the US Open,” Williams said.
“I was struggling to walk and that is a tell-tale sign that I should try to recover.
"I need four to six weeks of sitting and doing nothing.”
It puts on hold Williams' bid to equal Margaret Court's record of 24 grand slam singles titles, and likely rules her out for the rest of the year.
The Aussies in action on day 4, meanwhile, did not fare well either.
Gavrilova took the first set 7-5 but lost her match against Canada's Eugenie Bouchard, and Sharma went down 6-3, 6-3 against Ekaterina Alexandrova of Russia.
Women's top seed Simona Halep and third seed Elina Svitolina both progressed to round three, but US Open finalist Victoria Azarenka was sent packing by Slovakian Anna Karolína Schmiedlová.
In the men's draw, legend Rafael Nadal and US Open champ Dominic Thiem both sailed through to round three, while Alexander Zverev battled past France's Pierre-Hugues Herbert in five.
Watch Day 5 of the French Open LIVE and FREE from 10pm (AEST) on SBS and SBS On Demand.