Karim Benzema put Real 1-0 up after Isco squared it to the French striker.
But Sabin Merino levelled after Pepe and Dani Carvajal failed to take the ball from Javier Eraso.
Cristiano Ronaldo missed a host of chances for Real but substitute Alvaro Morata, on his 24th birthday, was the hero at the second attempt after Gorka Iraizoz saved his shot.
Relive the action as it happened.
Enthralling title race shaping up?
Real Madrid were the fourth team to top La Liga this weekend. Barcelona went to the summit on Saturday thanks to their 3-2 injury-time win over Valencia.
Earlier on Sunday, Sevilla went top when they won 1-0 against Atletico Madrid, who had gone into the weekend as league leaders.
Only three points separate Real, who started the game in fifth place, and Atletico, who now occupy that spot.
Ronaldo out of sorts?
Ronaldo looked short of confidence with his finishing throughout the game, although he was not afraid to try.
He had 11 shots in the game, more than Athletic’s combined total of 10, but only two of those were on target.
The Portugal captain, who missed the start of the season through injury, has only scored two goals in six La Liga games this season with both coming in convincing victories.
His malaise was best summed up when Lucas Vazquez found him in space in injury time, with Athletic having taken risks in a bid to find an equaliser.
Ronaldo had plenty of time to pick his spot or go round Gorka Iraizoz, but instead he shot straight at the goalkeeper.
Make Money Online in Nigeria... Click HERE To Start Now!