This seems to be happening to several users, my solution is to manually set up the account rather than allowing the mail app to enter the server details under the mail app & turning on the feature to use less secure apps within your Google account.
Incoming Mail (IMAP) Server - Requires SSL
imap.gmail.com
Port: 993
Requires SSL:Yes
Incoming Mail (POP3) Server - requires SSL:
pop.gmail.com
Use SSL: Yes
Port: 995
Outgoing Mail (SMTP) Server - Requires TLS or SSL
smtp.gmail.com
Port: 465 or 587
Requires SSL: Yes
Requires authentication: Yes
Use same settings as incoming mail server
Full Name or Display Name: [your name]
Account Name or User Name: your full Gmail address (******@gmail.com). Google Apps users, please enter user...@your_domain.com
Email address: your full Gmail address (******@gmail.com) Google Apps users, please enter user...@your_domain.com
Password: your Gmail password
If you have two-factor authentication on your account then an app specific password will be required instead of the account password.
Change account access for less secure apps
Change your settings to allow less secure apps into your account.
Go to the Less secure apps section of your Google Account.
Turn on Allow less secure apps. If you don't see this setting, your administrator might have turned off less secure app account access.