This was happening to me as well. The last time it was happening, it was an out of date IP Address at steam.
- Shutdown steam
- Click the Windows start button and type
cmd
- Click on Command Prompt to open
- Type the following command in the Command Prompt window:
ipconfig/flushdns
- Start Steam again.
- I was able to connect after doing the above.