Victor Laguardia scored a 90th-minute winner as Alaves handed Levante a fourth successive defeat.
Levante, sitting just outside the relegation zone, played with 10 men from the 29th minute after defender Chema was sent off for a foul that handed the hosts a penalty kick, which was missed by midfielder Manu Garcia.
Alaves forward Munir El Haddadi was red-carded for a second booking in the 77th to level up the sides, but it was the hosts that went on to grab all three points thanks to Laguardia's last-gasp strike.
Meanwhile, Real Betis missed a chance to move nearer to the Europa League qualification spots after being held by Real Sociedad to 0-0 draw at home.
The result dropped Betis to ninth place, four points behind Eibar in the Europa League spots, while Sociedad stayed in 14th place.
Finally, Lionel Messi's stunning free-kick was not enough for Barcelona as a controversial penalty earned Las Palmas a 1-1 draw to throw La Liga's title race wide open.