Sharapova hit 27 winners to Gavrilova's 10 and recovered a break early in the second set.
Sharapova's opponent in Sunday's championship match will be 10th-seeded Carla Suarez Navarro of Spain, who fought through her nerves and rallied past second-seeded Simona Halep 2-6, 6-3, 7-5.
Aiming for her second career title, Suarez Navarro improved to 4-0 in her career against Halep on clay. She created trouble for the Romanian with her one-handed backhand and looping shots.
"Her style is to hit the ball very high. It disturbs me, and I couldn't hit anymore in the third set," Halep said.
Suarez Navarro needed seven set points to close out the second set and three to end the third. The match lasted nearly 2½ hours.
This is the last big warmup for the French Open, which starts next weekend.
Information from The Associated Press was used in this report.