First off, market cap is mostly bullcrap. It is tied directly to stock price rather than assets meaning that any company with enough buzz or people driving up their share price can vie for the top spot.
Second, as things currently stand.... google is in a far better market position that apple for the future. Five years from now, almost nobody will be using an iPhone 4/4S/5 because these devices will be obsolete.
Conversely, almost everyone who has a gmail account (et. al) will still be using google's search/maps/email/<etc> services and apps because they are free and typically the best available.
Electronics are currently commoditized to the point that with enough money, anyone on this message board could lease a manufacturing facility, solder some chips to a board and manufacture a basic smart phone. A low enough cost would get you at least some market share.
It would be a little bit more difficult to compete against google search or google maps with a start-up (as Apple found out last year, and Microsoft has been finding out for a few years).
No one stays on top forever, but as an investor, I would expect Google's revenues to be more stable than Apple's for the next 5 years