There are several possibilities, try pulling up a console and typing:
Code:
telnet smtp.gmail.com 587
telnet smtp.gmail.com 465
If both of those connect (eg: it doesn't say timeout) then you likely don't have a firewall issue. If they don't connect you should review your local firewall (iptables -L -n) and your ISPs policy on outgoing connections to SMTP.