This one didn’t work for me
Here’s how Nick was finally able to connect to WiFi:
I found how to fix WiFi problems on iPhone 5. Settings -> General -> Reset -> Reset Network settings. Then go back and connect to any WiFi.
And Jeremy elaborates further:
The problem lies with your router IPv6
I found that having IPv6 disabled on my router (which it was) prevented any of my iOS devices from working. As soon as I enabled IPv6, everything started working again.
If you have an older router, it may be not IPv6 enabled.
My 10 year old WRT54G v1.42.2 simply didn’t have IPv6 capabilities. I had to run to the store across the street and grab one with “IPv6 enabled” on the box.
After that my iPhone 5 miraculously connected to Wi – Fi