Hmm. Well I dont think that you can look at the logs for gmail.
Try re-entering the password in the email entry in osTicket UI. (I doubt that it will do anything)
I'm not sure why one server would be able to talk to a remote server an the other not.
Maybe a local firewall, or mod_security, or SELinux, are probably the most likely culprits.
If we could get a error message from the remote server it would help narrow it down.
Did you check the PHP error logs?
Do you have the same PHP extensions enabled on both servers?