Microsoft had been building consumer hardware and software (X-Box, Pocket-PC, Windows Mobile) since ~2000 and Windows XP Tablet edition since 2002, and Zune, just about before iPhone. They owned the frontend on desktop and mobile, office and consumer. They had Exchange ActiveSync, one of the few possible competitors for Blackberry messaging, and they had hardware makers on board - just look at the list of companies which made Windows PocketPC devices, and the number of devices out for literally years before Google moved in the market at all:
https://en.wikipedia.org/wiki/List_of_Pocket_PC_Devices
https://en.wikipedia.org/wiki/List_of_Windows_Mobile_devices
It took them three years after iPhone to pivot to something multi-touch, (Windows Phone 7 in late 2010) and on release it had the limitations of the original iPhone release - no copy/paste, no custom rintones - and five years to get something with Windows NT kernel to compete with Apple's "It runs OS X".
If Microsoft had made better decisions, i.e. done what Apple did, and released a multitouch full-not-hobbled-software device as soon as the hardware was up to it, tuning Microsoft hardware and software together like they do now with the Surface range, there wouldn't have been a market gap for Google to enter.
And when Google did enter, the first Android released was the HTC Dream - coming out 18 months after iPhone release - and 6 months after iPhone had been discontinued and superceded - and being designed like a device from 2003. - https://en.wikipedia.org/wiki/HTC_Dream
If you'd asked people in 2005 who were the contenders for dominating the next decade of consumer mobile computing, what would they say? Would anyone seriously suggest Google anymore than Yahoo! or AOL or Compuserve?