The defeat leaves Madrid seven points adrift of leaders Barcelona after five games. Worryingly for Zinedine Zidane, the Madrid coach, his side has not won any of their games in front of their exacting fans at the Bernabeu.
"Last year we won games we didn't deserve to and now it is the reverse," said Zidane. "The league is very long. In the end we'll see how it goes but we need to be calm and we know we will have better days."
Madrid were frustrated by a string of fine saves from their former goalkeeper Antonio Adan. He thwarted efforts from Isco, Toni Kroos and Gareth Bale.
Madrid were punished in the dying seconds when Sanabria powered home a header from Antonio Barragan's cross to give Betis their first triumph at Real Madrid since 1998.
"It is impossible to win at the Bernabeu without suffering," said Betis boss Quique Setien. "To win against a team like Real Madrid, your goalie has to have a spectacular game and you have to have luck."
While Real Madrid languish in seventh place, Atletico Madrid won 2-1 at Athletic Bilbao to move up to third.
The visitors needed to rely on a brilliant penalty save from Jan Oblak to deny Aritz Aduriz just before half-time.
Angel Correa opened the scoring 10 minutes into the second-half by finishing off a flowing move involving Antoine Griezmann and Saul Niguez. Yannick Carrasco secured the three points with an angled finish from a Griezmann through ball 17 minutes from time. Raul Garcia netted a late consolation for the hosts.
"We are making an enormous effort," said Atletico Madrid coach Diego Simeone. "We have played five games and the response has been positive."
Sevilla remain second, two points behind Barcelona. Jesus Navas scored the only goal of the game in a 1-0 win over Las Palmas.