zydeco: Tal's description of this game in 'Life and Games of Mikhail Tal' gives a lot of insight into his thought-process.
He spent 40 minutes on his 17th move primarily calculating the lines following 20.....Qd8. He went down two 'false trails': 1) 21.Qh6 dxe5 22.Bxe5+ Bf6 23.Re3 Rg8 (if 23.....Bxe5 24.Rh3 wins) 24.Rh3 Rg7 and black defends and 2) 21.e6+ Bf6 22.Qh4 fxe6 23.Rxe6 Be5!! but decided that there should be some way to exploit the undefended position of the bishop on c6 so decided on 21.exd6+ Bf6 22.Qh4 Kg7 23.Bd7!
Tal went through all this feeling that the variations weren't quite right - as ToTheDeath points out, he missed 22.....Bg7 - but at a certain point he decided to simply go for it: he felt his position was strong and the win should be found in some sort of combination, so he played 17.f5 instead of 17.Kh1, which he suspected was objectively the more accurate move.
Tal's gamble paid off because Olafsson didn't look as deeply into the position - he played 20....Kg8 very quickly.
Tal says that after move 29, the players were in a mad time scramble -- and Olafsson flagged as he was trying to play 38.....Kg6.