This has happened a couple of times. The first time I contacted Apple Support and he was unable to fix, but after restarting a few times somehow iMac fixed itself. Yesterday was different. No such luck after numerous PRAM resets and starts. What did fix it was going into Network in System Preferences and manually turning on Wi-Fi, then restarting.
System Preferences -->
Turn on Wi-Fi