Williams rallied from 5-2 down in the first set and broke Sevastova three more times to set up a semi with third-seeded Yulia Putintseva of Kazakhstan.
"I didn't think about the set points. I just tried to not lose the set," Williams said. "But she was playing really well and was very determined, so it wasn't easy to play her."
Putintseva won the first set 6-3 against Stefanie Voegele, after which the Swiss retired because of injury.
Williams has beaten Putintseva in both of their previous meetings.
"I have a lot of respect for her and her game, and I hope tomorrow to have a faster start," Williams said.