To solve the error, you'll have to simply wait it out. It often takes around 30 minutes for the error to self-heal, but can sometimes take longer. If you're really desparate to get playing again, you can try clearing the app's cache or re-downloading the Pokemon GO app.
Also see: How to play Pokémon GO.
Pokemon GO troubleshooting: Failed to log in or Pokemon GO app doesn't load
This error is appearing more often than not for those who have a poor internet connection. However, at times it's out of our hands and is down to the Pokemon servers being overloaded. If you see the error, try disabling and re-enabling your internet connection and tapping on Retry.