Karim Benzema’s penalty put the league leaders in front after Ximo Navarro’s foul on Ferland Mendy.
Benzema then teed up Marco Asensio for the second, awarded after VAR overruled an incorrect offside decision.
Second-placed Barcelona trail by four points and, if they lose at Real Vallodolid on Saturday, Real can clinch the title by beating Granada on Monday.
Regardless, two wins – or one win and two draws – from their remaining three games will bring the championship to Zinedine Zidane‘s side.
Alaves, three points above the relegation zone, were overseen by new manager Juan Lopez Muniz for the first time after a five-game losing run had led to Asier Garitano’s departure.
But the Basque underdogs almost took a shock lead in the opening minutes when former Stoke and Newcastle striker Joselu’s header crashed off the bar and Lucas Perez’s follow-up was cleared off the line by Raphael Varane.
Real survived that scare and led through Benzema’s penalty – the Frenchman’s 18th league goal of the season – although Alaves remained lively, with on-loan West Brom winger Oliver Burke their main threat, forcing a save from Thibaut Courtois.
Asensio eventually added the second, after VAR confirmed Benzema was onside in the build-up, and while Joselu brought a smart save from Courtois, former West Ham goalkeeper Roberto had to be alert at the other end to keep out efforts from Rodrygo and Benzema.
If Real can finish the job, it will be only their second title in eight years, with their most recent coming in 2016-17, during Zidane’s last spell as manager.