Williams, the winner of eight tournaments this year, got past Eugenie Bouchard 4-6, 6-2, 6-2. It was the first dropped set for Williams since she lost in the fourth round at Wimbledon to Sabine Lisicki.
That was the only match Williams has lost in her last 44 WTA appearances.
She will meet Mona Barthel in the third round after Barthel defeated Maria Kirilenko 6-4, 6-4.
Serena's sister Venus Williams, meanwhile, fell to Elena Vesnina for her fifth setback in six matches. Vesnina emerged a 6-2, 5-7, 6-2 winner and will now meet Agnieszka Radwanska, who breezed by Varvara Lepchenko 6-4, 6-0.
Also advancing was Jelena Jankovic, who had to come from behind to defeat Ekaterina Makarova 2-6, 6-3, 6-3. Jankovic will now face Sloane Stephens, who pulled off a surprising second-round victory Tuesday over third-seeded Maria Sharapova.
Costly malfunction causes beer flood at Boston-area brewery
Video of Victoria’s Secret models trying to 'twerk' hits Instagram