Williams, who picked up the Wimbledon singles and doubles titles at the weekend, was not at her best but served and returned well enough to defeat the 19-year-old American.
"I couldn't quite believe I was playing today," Williams said. "But I'm healthy and I have a heartbeat so I didn't have a reason not to.
"I definitely felt sluggish and it was good to get the win over with, I'm still waking up at 2am."
Gibbs said she had been nervous playing against someone she admired so much.
"She is such a hero to me and I had her so built up in my mind I thought she was going to do no wrong," Gibbs said. "I collected a lot of experience points out there, if not physical points."
The American top seed next faces Chanelle Scheepers, the South African sixth seed, who beat Michelle Larcher de Brito of Portugal 6-3 6-4 to reach the third round.
Belgian fifth seed Yanina Wickmayer was made to work far harder as she dropped the opening set to Heather Watson before fighting back to claim victory in three sets, 5-7 6-1 6-4.
Defeat for Watson ended British interest in the Bank of the West Classic after Anne Keothavong failed to get past the first round.
"It was long and really tough," Wickmayer said. "She didn't make a lot of mistakes. In the second set I told myself to be more aggressive.
"In the third set we were even and it was just a few points between us. Maybe it was experience and a little bit of luck."
The home crowd's interest was retained until late in the day on the Stanford University campus when Coco Vandeweghe put in a terrific performance to beat fourth seed Jelena Jankovic 6-4 6-2.
"Her pace isn't as intimidating when I was a little slow and not making that many balls in the court," Vandeweghe said.
"Having that confidence against someone who moves as well as she does and to keep going for my shots, I thought I did really well today."
At the WTA event in Palermo, number one seed Sara Errani registered a regulation victory over Patricia Mayr-Achleitner, the Italian winning 6-3 6-2 to reach the third round.
Seventh seed Alize Cornet was surprised by Alexandra Cadantu of Romania, the French woman dropping to a 6-3 5-7 6-2 defeat in their second round match.
Meanwhile, eighth seed Barbora Zahlavova Strycova of the Czech Republic started her campaign with a 7-5 7-6(3) first-round win over Silvia Soler Espinosa of Spain.