This issue has been reported ever since 7.0X , for me the WiFi started expiriencing problems with 7.1 the last update.
They 3 solutions provided as follows:
1. Use airplane mode, enable wifi, connect to the wirless network.
2. Reset network settings in general/setting , connect to the network.
3. Reset the phone or the access point.
Other common one... (really dumb)
4. Say it's a hardware failure.
Those 3 do not work do not even waste time doing, if they do work it was because it was a coincidence, it was not related to those usless 3 posted solutions.
Going to my next point any person who says it is a Hardware issue, use warranty, it is a ridiculous answer, and here is why, there a lot of people with this issue and it related to the upgrade. Warranty has nothing to do with it. Yes it can be solved if by luck you are in warranty with an iphone 4 or 4s or and iPad 2 or 3. Why it will work because this happens in some devices not all.
Why this happens? I have read a lot of cases and done some troubleshooting myself. It is related with the WiFi chip. When the problem begins you will notice the phone will overheat and then the WiFi will start malcfunctioning, that is why when you stand near the access point it might work because the chipset via software is being not used properly. Why I think Apple won't give a ****, it is because it happens mostly in old devices and well if you upgrade to a new device, then they will only handle fixes for newer devices and also they focus on newer technology. So people using old devices are well ... not a priority. Sad as it sounds , this is what I have noticed.
Fix: easy , give us the option (for old devices) to go back to OS 6.x