I\'ve looked into the following links:
phpmailer send gmail smtp timeout
send email using Gmail SMTP server through PHP Mailer
http://uly.me/phpmaile
Check to make sure you can reach gmail from your webhost. I'm assuming it's linux. SSH in and on the command line type
telnet smtp.gmail.com 587
You should get back
Connected to smtp.something
It has to be a configuration difference between localhost and your provider