If it won't turn on, are you saying the WiFi is not greyed out but will not activate?
If that is the case, go to Settings > General > Reset > Reset Network Settings. Then go back and Settings > WiFi and choose your network and renter the password.
If that is not what you mean and the WiFi is greyed out, do:
Settings > Airplane Mode ON and Do Not Disturb ON
Power down and wait 5-10 minutes
Settings > Airplane Mode OFF and Do Not Disturb OFF
See if that helps.