Had the same problem, and it turned out to be an ipv6 issue. If I telnet into gmail (telnet smtp.gmail.com 25), it tries connecting to the ipv6 address, which does not work for some reason I haven’t figured out yet (i’m on Linux, CentOS 6, 64 bit). If I put the ip4 address in the settings, everything works just fine.