Azarenka had never taken a set off Williams in their four previous meetings, but recovered from a set down to win 2-6 6-2 6-4 in two hours and 18 minutes at Khalifa Tennis Complex.
The former Australian Open champion is ranked 48th in the world after serious injury problems, but won the title in Doha in 2012 and had already beaten third seed Caroline Wozniacki in the quarter-finals.
“I had to change something and I wanted to stay aggressive,” said the Belarusian. “I think that is something that is helping me. My net game is becoming stronger and stronger. I want to be an even more all-round player.”
Azarenka will face Lucie Safarova in the final after the Czech player defeated Carla Suarez Navarro 6-3 6-2 in an hour and 17 minutes.
Safarova has now won eight of her last 10 matches and is guaranteed to rise from 15th to a career-high world ranking on Monday.
“It’s so exciting,” Safarova said. “It’s my first final this year and I’ve been playing so well in all my matches so I’m really, really happy.
“It wasn’t a struggle at the start of the year. I lost a couple of close matches – it happens sometimes. But I worked really hard in the off-season and my level has been going up, so I’m enjoying playing.”