The first thing to do when you have Internet connection problems is to check local firewall or installed Internet Security solutions. In this case you will need to add the game/application you're using to the Exclusion list which is available for both Windows Firewall or Internet Security. Once you do that, the connection between you and the game server will be established correctly.
In case you're using a router or a modem, you might need to perform additional maintenance (restart, reconfigure, turn off built-in firewall).