Hello,
can you try to add Gmail as a generic Imap account and see if it gives the same error, the settings are:
Incoming server: imap.gmail.com
Security: SSL
Port: 993
Outgoing server: smtp.gmail.com
Security: SSL
Port: 465
Requires authentication: Yes
Jogy