The Olympic gold medallist strained her ankle while playing doubles with sister Venus on Wednesday before labouring through her second-round match with the Spaniard.
"I was running for a shot and rolled it," she told reporters. "Story of my ankle life. But it was fine.
"I did a lot of ice and tape, compression to keep the swelling out. I rolled it in Australia so I was a little nervous but it's fine."
Williams, who is looking to win a fourth title at Flushing Meadows, faces Ekaterina Makarova in the third round.