Sharapova defeated Errani 7-5, 7-5 in 2 hours, 29 minutes. It was a rematch of their French Open final from last year, which Sharapova also won.
Jelena Jankovic will meet Sharapova in the semifinals after outlasting Roberta Vinci 6-4, 6-7 (6-8), 6-3. The other semifinal match, which was set up Tuesday, will send Serena Williams against Agnieszka Radwanska.
Sharapova has won all four meetings with Errani and kept that record unblemished despite suffering 57 unforced errors and 13 double faults. The second-seeded Sharapova is trying to win her second straight tournament, having captured the title at Indian Wells two weeks ago.
Jankovic, who had not defeated a player ranked higher than 30th in the world this year until Wednesday, downed the 15th-ranked Vinci in 2 hours, 30 minutes.
Jankovic won the 13th championship of her career earlier this year in Colombia, but four of the five victories in that event came against players ranked 100th in the world or lower.