The world number one was beaten 6-7 (6-8) 6-3 5-7 7-6 (7-3) 6-1 in four hours and 34 minutes.
It was a repeat of last year’s semi-final, which the Briton won before going on to lose the final to Novak Djokovic.
Former champion Wawrinka will play Rafael Nadal in Sunday’s final after the Spaniard beat Dominic Thiem.
Nadal, who beat the Austrian 6-3 6-4 6-0, will become the first player in the open era to win 10 titles at one Grand Slam if he beats Wawrinka.
The 31-year-old Nadal is yet to drop a set in this year’s tournament as he looks to secure his first Grand Slam since winning in Paris in 2014.