1. Check your time and date on the phone to make sure it is correct.
2. a. Clear out the WiFi data on the phone.
b. Reboot the modem/router.
c. Once the modem/router is fully 'up' again, reboot the phone and re-input the WiFi data.
NOTE: Even if the WiFi works for all other things connected to it, it is possible that your one device is more sensitive to changes in the connectivity. It happens all the time. Sometimes the only way to resolve that is to reboot the router/modem.
Should none of the above work, then it may be a physical problem with the phone. In that case, if the phone is under warranty still I would contact the manufacturer. If it isn't, then you can take it to someone to fix, or look into a new phone.