The 23-year-old hit back from 5-2 down to take a topsy-turvy first set on the tie-break, and then rallied again from a 3-1 deficit in the second set to eliminate Errani, who had headed into the tournament boosted by having won her third WTA title in Acapulco last week.
King's fellow American Jamie Hampton enjoyed a straightforward passage to round two with a 6-0 6-1 triumph over Slovenia's Polona Hercog.
Japanese veteran Kimiko Date Krumm also advanced with the minimum fuss, beating France's Pauline Parmentier 6-1 6-3, while Czech Republic's Klara Zakopalova cruised past Spaniard Laura Pous Tio 6-1 6-1 and Germany's Mona Barthel swept aside American Jill Craybas 6-1 6-2.
There were mixed fortunes for the two Britons in first-round action, Anne Keothavong going down 6-4 2-6 7-5 to Switzerland's Timea Bacsinszky before Elena Baltacha battled from a set down to overcome Holland's Arantxa Rus 3-6 6-4 6-3.
Spain's Carla Suarez-Navarro and Russia's Elena Vesnina progressed with straight-sets victories over Bulgaria's Tsvetana Pironkova and Australian Casey Dellacqua, respectively.
There were also wins on Wednesday for Barbora Zahlavova-Strycova, Galina Voskoboeva, Jarmila Gajdosova, Sania Mirza, Michaella Krajicek, Sorana Cirstea and Sloane Stephens.
There was better news for Elena Baltacha in the second match on Court 8, the British number one coming from a set to down to defeat Holland's Arantxa Rus 3-6 6-4 6-3.
Baltacha, ranked 62 in the world, battled from a break down in the final set to secure her place in round two, where she will face 14th-seeded German Julia Goerges.
Baltacha was pleased with the way she fought back when she looked to be heading out of the competition.
She said: "Today's [Wednesday] been a really good win for me and I really needed that. I felt really good after the first set. She gave me an opportunity, I took it and after that I really felt like I was mixing everything up and I felt comfortable.
"In the third set I went 0-2 down but I still felt like I could win the match and I ended up winning the next five games.
"When my coach Nino [Severino] came onto the court he told me to fight, just fight and that's what I always try to do. You're never out until you lose the last point."