HTC Desire has trouble to establish connection via Wifi
I have noticed the same thing happening occasionally - I find that if I turn the wifi (on the phone) off and on again it will usually pick the wireless network up straight away - that's not quite as drastic as having to enable/disable airplane mode.