Gustafsson tied for low round of the tournament with his final-round 66 that got him into the playoff.
On No. 18, the playoff hole, both players found the fairway off the tee. Hanson, playing first, missed the green to the left. Gustafsson missed the green farther left and found a terrible lie.
Gustafsson pitched his ball 15 past the cup, while Hanson's chip rolled within 2 feet of the hole. Gustafsson's par putt lipped out leaving the door open for Hanson. The 27-year-old Hanson tapped in his short par putt for his first win on the European Tour.
'I am really happy with the way I played today under that pressure, coming out with the lead,' said Hanson. 'I don't think I missed any shots the whole way around. A couple of bad clubs, on the first and fifth, but apart from that it was really good golf. This means a lot to me. It is always hard to get your first win and I haven't been in this position of being able to win many times, so to pull it off on my first time feels great.'
Peter Lawrie carded a 3-under 69 to move into a tie for third place at 5-under-par 283. He was joined there by Hennie Otto, who shot an even-par 72 on Sunday. Stephen Dodd matched Gustafsson's 66 to climb into a share of fifth place alongside Robert Karlsson at minus-3.
Hanson opened the round with a two-shot lead over Hennie Otto. Hanson tripped to a bogey at the first, but atoned for that error at the next as he drained a 20-foot birdie putt on the Old Course at San Roque Club.
The Swede moved to minus-8 when he dropped in a 6-foot birdie putt at the fourth. Hanson hit a poor second shot at five and that led to another bogey.
Hanson two-putted for birdie at the par-5 ninth to get back to 8 under. He played the ninth in 5 under par for the week. Hanson got nothing going on the back nine as he parred all nine hole around the turn.
'My swing let me down a few times Saturday, but today it felt really good,' said Hanson. 'I've been striking the ball good for a while and I'm happy to get it together this week.'
Gustafsson's hot front nine got him back into the fray. He rolled in a 10-foot birdie putt at the first and picked up another birdie at the third, but tripped to a bogey at four.
On the par-5 fifth, Gustafsson spun his third shot back within inches of the cup and he kicked that in for birdie. The Swede ran home a 35-foot birdie try at six and made it three in a row as he drained a 30-footer for birdie at seven to move to 6 under.
Gustafsson briefly tied Hanson in the lead as he two-putted for birdie at the ninth. After Hanson later birdied the same home, Gustafsson sank a 15-foot birdie putt at 15 to again tie for the lead. He had a chance to win in regulation, but his birdie putt at the last lipped out.
'I was hoping to come out and get a good start and that's what happened,' said Gustafsson. 'The weather was good at the beginning and I thought I had a chance to win it with eight-under in the clubhouse. But Peter played fantastic yesterday and today. I guess he deserved it.'