See this Apple support link—>If your iPhone, iPad, or iPod touch won’t connect to a Wi-Fi network - Apple Support
Basic things to check: Is the problem with one Wi-Fi network, or all Wi-Fi networks?
All networks (if either fixes it, stop):
Beyond that, it is probably a hardware issue. Contact Apple Support (link at the top of this page)
One network (if any step fixes it, stop):
- If it is just one focus on the router. First reboot the router by removing all power for 15-30 seconds. This will usually fix it.
- On the router check for MAC Filtering (aka Access Control). If it is on your phone’s Wi-Fi address must be in the Allowed list.
- Try very close to the router.
- On the phone, Settings/Wi-Fi - tap on the i next to the network name and “forget” the network, then try again.
- Settings/General/Reset-Reset Network Settings
If none of these fix it post back.