I have tried everything imaginable. Reboot the router, restored the phone. Sometimes it logs on but won't hold it. Problems started on my 3GS when ios 6 appeared. Best hope is wait for 6.1. I have no choice but to unlock mine until its resolved.
Reboot both your phone and your router. Also, upgrade to 6.0.2 which corrects a wifi issue.