After sharing the spoils with Getafe and losing to Levante in their last two games, Alaves had the most important reaction they needed thanks to an additional-time goal from substitute Manu García, who came on for Wakaso by the 74th minute.
Wakaso had an incredible game although he was booked on 54th minute for a rush tackle on his marker.
"Yessss +3 great team work and thanks for the wonderful support from the fans,” he wrote on Twitter.
The defeat means Madrid have failed to score in four consecutive games in all competitions, for the first time since April 1985.
Alaves have moved to third on the log with 14 points, on tie with Barcelona and Madrid who boast of a better goal difference.
Wakaso will be switching attention to national duties as Ghana host Sierra Leone in the 2019 Africa Cup of Nations qualifying double header next week.