Gonzalo Higuain scored Real's winner in the 21st minute with a close-range shot.
Manuel Pellegrini's side were unlucky not to extend the gap after squandering several goalscoring opportunities.
"The game wasn't as tight as the scoreline suggests. On another day, playing worse, we would probably have scored more goals," coach Pellegrini said after the game.
League holders Barcelona looked on their way to a ninth win this season when right-back Daniel Alves put them in front shortly after the restart.
He latched onto a deft Xavi pass to fire inside the far post but Bilbao's substitute Gaizka Toquero cancelled out his effort on 63 minutes when he caught Barca's defense napping to slot home.
Real moved top with 28 points, one ahead of arch-rivals Barcelona. Both sides meet in the 'clasico' on Sunday.
Higuain goal
Barcelona-Bilbao match goals