Be sure the date and time is same as the router then retest. If that fails, take it to your carrier for them to test there.
I have a motorolo g4. As of a week ago, it stopped connecting to the internet. I know the WiFi password is correct as it will connect, but say no internet is available. Other devices do not have this problem. We have tried forgetting the networks, resetting network settings, resetting the modem, etc. and even ended up doing a factory reset in hopes it would be fixed, but nothing has worked and now I can’t sign in to the "new" phone since it can’t connect to internet. The phone had no problems accessing the internet on public networks, but has trouble getting an IP when a password is needed. Any thoughts or ideas appreciated.
Moderator note: Off topic links, spam links are routinely removed.

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic