My phone worked perfectly for several months and then Wi-Fi would just randomly stop yet appears normal. I am messed around with my router settings and reconnecting to the router would get it working briefly again a matter of minutes, then it would just stop working again but still appear to be connected.
I did some limited research and there are some reports of the Wi-Fi connectivity in this fashion. In almost all cases the forum conversation goes something related to IOS. Same here, my phone was okay with earlier IOS 5.1.1 but then it began giving me problem after updating to IOS 6.0.1. However, seeing that my iPhone was still covered by Apple’s One-Year Limited Warranty, I backed up my visit to local Apple Store and grasped a brand new iPhone 4S in my hands again.