I am trying to setup gmail on a clean install of Mavericks 10.9.5. The Gmail settings like enabling IMAP etc are all set.
So now I am ready to add a new account in my mac, by going in System Preferences -> Internet Accounts and click to add a new Google Account.
Entering the email address and password and clicking the ok button, I am getting immediately an error message in red: "A connection error occurred".
I am trying the same directly in Mail app, still the same. There is no 2step verification and all security settings in Google account are setup so the connection should work. I have also unblock access via the Google Unlock Captcha. But yet I am not able to create my account.
Also, if I try to use a wrong password or username, it immediately tells me that my credentials are wrong, so it seems like there is a communication with Google, but something goes wrong with the Auto-creation of a Google account.