Reset the modem and router and also check to see if your router has the most up-to-date firmware. If you do not use an Apple Router you will need to use the utilities supplied by the router manufacturer. If you use an Apple router (Airport Extreme, Time Capsule, Airport Express) then launch Airport Utility and it will detect if any updates are necessary or you can also run Software Update and it should find any Apple router updates.
Please test after taking each of the following steps that you haven't already tried. Stop when the problem is resolved. Back up all data before making any changes.
Take the applicable steps in this support article. The Wireless Diagnostics program generates a large file of information about your system, which would be used by Apple Engineering in case of a support incident. Don't post the contents here.
Disconnect all USB 3 devices. If you don't know which are USB 3, disconnect all USB devices except keyboard and mouse.
If you're not using a wireless keyboard or trackpad, disable Bluetooth by selecting Turn Bluetooth Off from the menu with the Bluetooth icon. If you don't have that menu, open the Bluetooth preference pane in System Preferences and check the box marked Show Bluetooth in menu bar. Test. If you find that Wi-Fi works better with Bluetooth disabled, you should use the 5 GHz Wi-Fi band. Your router may not support it; in that case, you need a new router.
Open the Network pane in System Preferences and make a note of your settings in the Wi-Fi service. It may be helpful to take screenshots of the various tabs in the preference pane. If the preference pane is locked, unlock it by clicking the padlock icon and entering your administrator password. Delete Wi-Fi from the service list on the left by selecting it and clicking the minus-sign button at the bottom. Then recreate the service by clicking the plus-sign button and following the prompts.
Launch the Keychain Access application. Search for and delete all AirPort network password items that refer to the network. Make a note of the password first.
Make a "Genius" appointment at an Apple Store, or go to another authorized service center.