Barcelona, which beat Real Sociedad 1-0 on Saturday, was left two points ahead of Real Madrid at the top, one week after the Catalan club had lost the “clásico” to its rival.
Led by France forward Nabil Fekir, Betis outplayed Madrid for long stretches of the match in Seville.
Betis defender Sidnei scored one goal and unintentionally helped Real Madrid claw back an equalizer just before halftime.
Sidnei rifled in Betis’ goal in the 40th minute before he committed a foul that Karim Benzema converted to level the score in first-half stoppage time.
Zinedine Zidane sent on more attacking players to seek the winner, but Betis substitute Cristian Tello scored the hosts’ second goal in the 82nd after a passing mistake by Benzema that led to a quick counterattack.
Betis was winless in six games before taking down Madrid.