Reboot the router.
Turn Wifi on with NO security - does it connect?
Turn WPA-PSK on - does it connect?
Turn WEP on - does it connect?
That is the proper way to troubleshoot it.
90 percent of the time the problem isn't the phone, but the router. Sometimes a power cycle/reboot fixes it. Could be the channel the router is set to use (I hate when people leave it on Automatic) Find a quiet channel (there are apps for that) and set it to use that. Sometimes it is just the router settings aren't accepting any new connections until you reset the password or change anything to do with the security.