Errani won 6-0, 0-6, 7-6 (5) in the third round Friday after Williams had a chance to serve out the match in the final set.
Williams twice came back from down a break in the third but was done in by too many unforced errors she made 52 in all. Trying to close out the match at 5-3, the 19th-seeded Williams had one of her eight double-faults.
The 13th-seeded Errani next faces qualifier Mirjana Lucic-Baroni, who stunned second-ranked Simona Halep 7-6 (6), 6-2. The 32-year-old Lucic-Baroni hadn't made a Grand Slam round of 16 since 1999, waylaid by injuries and financial struggles.
"I feel like a little kid, like this is the first time ever happening," Lucic-Baroni said.
Errani, who wasn't thrilled with fans yelling out support for her opponent during her serves, won just 12 games in three previous meetings with Williams. But in the first set, Williams couldn't take advantage of her power, making just 30 percent of her first serves.
Errani used her quickness to run Williams around the court, and the 34-year-old seemed sluggish after playing a long doubles match with her sister on Thursday night.
But in the second, Williams looked like the seven-time major champion she is, pouncing on Errani's soft serves.
"She's playing unbelievable," Errani said. "I really don't know how I won today."
Errani just had a little more left in the final set. And in the tiebreaker, Williams made four more unforced errors.
Errani's quick reflexes, honed in doubles, gave her match point when she stabbed a backhand volley to return what looked like a sure winner by Williams.
"Unbelievable," Errani said. "If I don't do that, maybe I lose."
The 5-foot-4 Errani reached the final at the French Open and the semis at the U.S. Open in 2012, but both times she was routed by power players: Maria Sharapova and Serena Williams.
Big sister Venus couldn't do the same Friday, though she did later earn an easy victory in doubles with Serena.
Sixth-seeded Angelique Kerber also was upset, losing 6-1, 7-5 to Swiss teen Belinda Bencic. Bencic, 17, is coached by Martina Hingis' mother, Melanie Molitor, and was coming off a third-round showing at Wimbledon.
"I started believing that I can play with these players," Bencic said.Earlier, Peng Shuai again beat a seeded player to reach her second straight Grand Slam round of 16. Two days after upsetting fourth-seeded Agnieszka Radwanska, Peng defeated 28th-seeded Roberta Vinci 6-4, 6-3.
Half of the top eight seeds are now gone on the women's side. Nothing like that among the men.
O Third roundSaturday, 9 a.m.
TV • Ch. 2
TV • Ch. 2