Former Real Madrid striker Javier Portillo scored what proved to be the winner 14 minutes from time.
Barcelona, who claimed a 3-3 draw with Real Madrid on Saturday, stayed on top with 50 points, on level with second-placed Sevilla.
Elsewhere, Real Zaragoza were held to a 1-1 away draw by Real Betis.
Argentine international Diego Milito put the visitors in front after 21 minutes before Brazilian midfielder Marcos Assuncao notched the equalizer just before the break.
Atletico Madrid revived their Champions League hopes with a 2-0 win over Devortivo de La Courna, thanks to goals from Luciano Galletti and Mista.
Real Sociedad grabbed their third win of the season after defeating Mallorca 3-1 at Anoeta stadium.
Veteran winger Bortolini Savio fired the home side ahead in the 27th minute but was cancelled out by Ariel Ibagaza's strike on 39 minutes.
Serbian striker Darko Kovacevic restored Sociedad's lead in the 43rd minute before Xabier Prieto sealed the vital three points deep into stoppage time.
Despite the win, the Basque side remain at the bottom with just 17 points, ten behind the safety zone.