First thing to do is go to Start > Control Panel > Network and Internet > Network and Sharing Center > Change Wireless adapter settings. Right-click the network adapter used by the Wi-Fi and then go to Properties > IPV4. Make sure that all the options are on Automatic. Enable then disable the adapter and try to connect again. It should work now.