The newly-promoted hosts took a shock lead early in the first half with a classy goal through Ramazani, who picked up a perfect ball over the top of the Madrid defense, took one touch and fired a low line drive past Thibaut Courtois to make it 1-0.
Carlo Ancelotti’s side — which included five changes to the starting 11 that won both the Champions League and the UEFA Super Cup — applied plenty of pressure throughout the first half and even had a Vazquez goal ruled out for offside as Almeria clung to their narrow lead until half-time.
Madrid ratcheted through the gears and found their equaliser just after the hour mark when Vazquez pounced on a loose ball and scored from close range following Vinicius Junior’s hard-charging run into the area.
Alaba made the ultimate impact as a substitute, scoring the go-ahead goal with his first touch after coming on for Ferland Mendy. The Austria international bent the ball up and over the Almeria wall from a free kick into the top corner after Luka Modric was brought down just outside the penalty area.