The US-born Duchess of Sussex watched as seven-time champion Williams overcame a scare to beat Slovenian qualifier Kaja Juvan 2-6, 6-2, 6-4 in a second round contest.
Prince Harry's wife Meghan arrived on Court One after play had already got under way.
The duchess was flanked by two friends from her university days as she took her spot among spectators on the 12,000-seater court.
Genevieve Hillis and Lindsay Roth were fellow students of the royal who studied both theatre and international relations at Northwestern University, graduating in 2003.
Williams and Meghan have become close in recent years, inviting the 23-time Grand Slam champion to her wedding at Windsor Castle in May last year.
Meghan gave birth to her baby son Archie Mountbatten-Windsor on May 6 this year.
He is being christened on Saturday but the Sussexes are not revealing who the godparents will be.
However, Williams ruled herself out of the guessing game.
"No. I'm working on Saturday," Williams said.
The 37-year-old American -- bidding to join Margaret Court with a record-equalling 24th Grand Slam title -- had struggled to impose herself on an opponent ranked 133 in the world out on court.
Earlier Swiss great Roger Federer revealed he had recently had a tennis knockabout with Archie's cousin Prince George.
The five-year-old is the son of Harry's brother Prince William and his wife Kate. She turned up to Wimbledon on Tuesday.
The Duchess of Cambridge saw some of the action on the outside courts before taking her place in the Royal Box on Centre Court.
Williams was asked if she might one day play tennis with Archie, as Federer did with George, but she said she was busy training up her daughter Olympia, who will be two years old in September.
"I'm actually working on Olympia's game. Maybe she can give tips to him. She'll be his older sister.
"We like to do a lot of sports with Olympia. Actually she likes soccer more, so we'll see."