If browsing works, but WhatsApp doesn't, please contact your mobile provider and system administrator and make sure that your APN and router are configured correctly to allow non-web and socket connections. You may also try a different connection. If you are connected to Wi-Fi, try mobile data or vice versa.
Make sure background data is not restricted
Open your phone's Settings app > Apps > WhatsApp > Data usage.
Make sure background data is not restricted.
Repeat the above steps for Google Services.
Restart your phone, or turn it off and on.
Reset app preferences by going to your phone's Settings app > Apps > Menu icon > Reset app preferences.
Prevent power saving mode from activating, for example by leaving your phone plugged into a power source.
Log out from WhatsApp Web by going to WhatsApp > More options > WhatsApp Web > Logout from all computers.
Keep your Wi-Fi on during sleep mode by going to your phone's Settings app > Wi-Fi > Settings icon > Keep Wi-Fi on during sleep > Always.
Uninstall any task killers. These will hinder the app from receiving messages when you are not using it.
Launch the Hangouts app and sign out of all of your accounts. Then re-launch Hangouts and sign back on.
OS specific additional troubleshooting
Android 4.1 – 4.4
Make sure that Auto-sync data is turned on in your phone's Settings app > Data usage > Menu icon > auto-sync data.
Make sure that Wi-Fi optimization is turned off in your phone's Settings app > Wi-Fi > Menu icon > Advanced > Wi-Fi optimization.
Make sure Do not disturb is turned off or you have allowed WhatsApp notifications in priority mode in your phone's Settings app > Sound > Do not disturb.
Make sure all of WhatsApp's permissions are granted in your phone's Settings app > Apps > WhatsApp > Permissions.
If none of the above steps help, it is possible that you are not receiving updates from Google's push notification service.