Take each of the following steps that you haven't already tried, until the problem is resolved. Some of these steps are only possible if you have control over the wrieless router.
Restart the router. Many problems are solved that way.
Change the name of the wireless network, if applicable, to eliminate any characters other than letters and digits. You do that on your router via its web page, if it's not an Apple device, or via AirPort Utility, if it is an Apple device.
Launch the Keychain Access application in any of the following ways:
☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
☞ Open LaunchPad. Click Utilities, then Keychain Access in the icon grid.
Enter the name of your wireless network in the search box. You should have one or more "AirPort network password" items with that name. Make a note of the name and password, then delete all the items. Quit Keychain Access. Turn Wi-Fi off and then back on. Reconnect to the network.
You may need to change other settings on the router. See the guidelines linked below:
Make a note of all your settings for Wi-Fi in the Network preference pane, then delete the connection from the connection list and recreate it with the same settings. You do this by clicking the plus-sign icon below the connection list, and selecting Wi-Fi as the interface in the sheet that opens. Select Join other network from the Network Name menu, then select your network. Enter the password when prompted and save it in the keychain.