This is a fairly common problem, but for most people it can be resolved within a few tries. The most common causes are..
Mistyping your password. Oddly enough, this produces an error like "connection failure" or "connection timeout." Type it carefully and make sure caps lock is off. Or get rid of the password and see if this fixes it.
A version mismatch between the client and server. Ark is updated quite often. On the server listing page, we say either "Up to Date" or "Needs Update" next to your server version number. You can force your server to get updated by restarting it.
A network problem on your end. Reboot your router and your computer, and make sure Steam is running and not reporting any connection errors.
If you are connecting for the first time, your client may be trying to download all the mods that your server has installed. This can take a while, and you'll see text like "Downloading Whatever Mod" in the lower-right corner of the screen while it's happening. It's actually possible for your connection to the game server to time out while you're waiting for the mods to download.
The simple solution is to try again. Eventually all the mods will download and it'll work. Alternatively, just go to the Steam Workshop and download all the mods yourself.