Check that all of the imap settings are correctly Configuring other mail clients - Gmail Help. Also check with your host that port 993 (outgoing) is unblocked, A lot of hosts block it. If that still doesn't work please post your error log.
Thanks, I contacted my webhost & they opened port 993. It works like a charm now.