Kvitova served 10 aces and 10 double-faults in the 2 1/2-hour match. She became the highest seeded woman to lose so far.
Williams, a three-time semifinalist in the desert, is the oldest woman in the tournament at 38. She's seeking her 50th career title. Williams also needed three sets to beat Andrea Petkovic in the first round.
Wimbledon champion Angelique Kerber dropped just two games in beating Yulia Putintseva 6-0, 6-2. Kerber broke serve to open the match on her way to winning the first 10 games in a row.
Kerber, seeded eighth, converted 93 percent of her first serves and moved on to a third-round match against qualifier Natalia Vikhlyantseva.
"I was playing really aggressive," Kerber said. "Yeah, it's good to start the tournament like that."
Other seeded winners were: No. 9 Aryna Sabalenka, No. 11 Anastasija Sevastova, No. 21 Anett Kontaveit and No. 24 Lesia Tsurenko.
Milos Raonic, Gael Monfils, Gilles Simon and Laslo Djere were seeded winners on the men's side.
The world's top-ranked players — Novak Djokovic and Naomi Osaka — had night matches at Indian Wells Tennis Garden.
There were several upsets on Day 4 of the combined ATP-WTA event.
No. 9 Stefanos Tsitsipas, who lost to Roger Federer in both the Australian Open semifinals and the final in Dubai last week, was ousted by Felix Auger-Aliassime 6-4, 6-2.
Also losing on the men's side were No. 11 Borna Coric and No. 23 Alex de Minaur.
In the women's draw, No. 17 Madison Keys, No. 26 Carla Suarez Navarro, No. 28 Donna Vekic and No. 30 Anastasia Pavlyuchenkova lost.