Had Nokia jumped on board of the smart phone grace right off the bat and supported Google instead of Microsoft the scene might be way different.
To put it simply, they missed the transition to smartphones, just like Blackberry. They were in control of their OS, it makes sense they didn't want to give it away before it became clear that they couldn't do it.
They had Symbian, which was old and crappy, and Maemo then Meego which apparently, they didn't push enough. The real winning move would have been to bet everything on Meego, bring in the partners they have with Symbian before Android took the market. They didn't do it because they were clinging to the dying Symbian.
Honestly, if they had adopted Android right away I'm not sure they would have been able to compete against HTC/LG/Samsung and other Asian companies.