Follow the instructions bellow If your IPhone WiFi would not turn on, roll, or grayed out.
Steps to resolve the issue:
1. Restart your iOS device.
2. Make sure that airplane mode is off by tapping Settings > Airplane Mode.
3. Reset the network settings by tapping Settings > General > Reset > Reset Network Settings.
4. This will reset all network settings, including Bluetooth pairing records, Wi-Fi passwords, VPN, and APN settings.
If this does not resolve the issue, upgrade the phone to the latest software using iTunes on your computer.
See this article for more details:
iOS: Wi-Fi settings grayed out or dim