javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 25;
Sounds like a firewall problem (firewalls silently drop packets that are not allowed, which is why you would be seeing a Connection Timeout.
Can you try
H:\> telnet smtp.gmail.com 25
Connecting To smtp.gmail.com...Could not open connection to the host, on port 25
: Connect failed
on your server and see whether you get a connection? (I'm behind a firewall here that does not allow connections to gmail)