Barca top scorer Robert Lewandowski, back in the side after recovering from injury, had an early opportunity when he broke clear on goal but his shot was smothered by the onrushing Julen Agirrezabala.
That seemed to spark Bilbao, who went close twice in quick succession when Williams' shot was saved by Ter Stegen and Raul Garcia's header from the resulting corner hit the bar.
Barca went ahead when Sergio Busquets' probing pass was collected by Raphinha in the area and the former Leeds forward fired across Agirrezabala and into the far corner for his second goal in successive games.
The Brazilian's celebrations were initially cut short by the assistant referee's flag, but replays showed he was well onside and VAR overturned the decision.
Bilbao were the stronger side in the second half, but efforts from Alex Berenguer and Iker Muniain were superbly saved by Ter Stegen.
Bilbao thought they had the equaliser their pressure deserved when Williams raced onto a pass over the top and powered the ball home, but the goal was eventually chalked off for a handball by Muniain in the build-up.