I've noticed this happening to a lot of players recently including me. The interesting part is when this happened to me the game connected while using 4G, but when I used wifi I got the same error message as you. It seems like an issue with your connection trying to reach the server. It ended up resolving itself after a few hours for me though.
Happened to me, I just kept trying to log in over and over. Finally worked...
Ask me anything and ill try my best to answer