The five-time champion at the All England Club reached the final four for the second year in a row by beating Jelena Ostapenko, 6-3, 7-5, Tuesday under a closed roof on Centre Court.
Williams, who is 37 years old, made her Wimbledon debut in the same month Ostapenko was born. She last won the title in 2008, but reached the semifinals last year and the Australian Open final this year.
Williams will next face either second-seeded Simona Halep or Johanna Konta on Thursday. In the other women's semifinal match, Garbine Muguruza will play either CoCo Vandeweghe or Magdalena Rybarikova. Muguruza beat Svetlana Kuznetsova 6-3, 6-4 on No. 1 Court.
On the men's side, Novak Djokovic advanced to the quarterfinals by beating Adrian Mannarino 6-2, 7-6 (5), 6-4. That match, the first to be played under the roof on Centre Court at this year's tournament, was postponed from Monday.
Williams went up a break early in both sets against Ostapenko, the French Open champion. But the 20-year-old Latvian broke back in the second set and pushed the score to 5-5. A few unforced errors later, though, and Williams broke again for a 6-5 lead before serving out the match.
Williams ended up with eight aces and only 13 winners. Ostapenko had one ace and 20 winners.
In the first match, Djokovic was up a break in the third set when he asked for a medical timeout and a trainer examined and stretched his right shoulder. The second-seeded Serb appeared to grimace in pain a couple of times as his shoulder was being checked.
“It's been something that I've been dragging back and forth for a while now,” Djokovic said. “But I'm still managing to play, which is the most important thing.”
Djokovic was broken by Mannarino only once, in the second set. But the 12-time major champion, who won the Wimbledon title in 2011, 2014 and 2015, broke Mannarino’s serve early in the third and advanced to the quarterfinals at the All England Club for the ninth time.
Mannarino has never before reached the quarterfinals at any of the four Grand Slam tournaments. He also lost in the fourth round at Wimbledon in 2013. Last year, he lost to Djokovic in the second round at Wimbledon, also in straight sets.
Djokovic will face 2010 Wimbledon finalist Tomas Berdych, a man he has beaten 25 times in 27 matches, on Wednesday in the quarterfinals.
The men traditionally have Wimbledon’s second Tuesday off, but Rafael Nadal's five-set loss to Gilles Muller on Monday forced Djokovic's match to be pushed back a day.
Rain just before the start of the first match on Centre Court led tournament officials to close the roof for the first time this year.