I know this post is NOT about Gmail, and I'm sorry to post again here on this, but since posted some weeks ago on this I want to reply and say a couple things.
1) My solution from way back when did not pan out and did last.
2) Csound1, in another thread, which I cannot now find, has likely found the solution to the problem many of us using Apple Mail and Gmail have.
QUESTION: For those of you who are having problems with Gmail properly syncing with Apple Mail (read counts, etc.), if you go to Mail-->Preferences-->Google-->Account Information, what is in the usernmae field? is it your FULL gmail address or just the first part?
When you set up Gmail from scratch on Apple Mail, typing in your email address and password, Apple Mail puts only the first part of your email address as your username (the stuff before the @). In the past, this has worked fine for me using Apple Mail with Gmail, but something has changed with either Gmail, Apple Mail, or both.
Google itseld insists that youre FULL email address has to be entered as your username. See: https://support.google.com/mail/troubleshooter/1668960?hl=en#ts=1665018,1665139
You're going to have to go into the preferences and change that.
My advice?
1) Quit Mail.
2) Delete your Google Mail account from "Internet Accounts" In System Preferences.
3) Open Mail, go to Mail-->Preferences-->Accounts-->+ to add a new account, select Google, type your info in, but then go to the account in the list and change your username to your FULL email address.
I think this is probably easiest for most of you, but I did the following:
1) Quit Mail
2) Delete Google Mail Account from "Internet Accounts" in System Preferences
2) Delete Mail folder in ~/Library
3) Restart and then empty trash.
4) Open Mail, go to Mail-->Preferences-->Accounts-->+ to add a new account, select Google, type your info in, but then go to the account in the list and change your username to your FULL email address.
It's not been a problem since. The fact that many people are not having any problem with Gmail whatsoever means it has to be something the others of us are overlooking. I am willing to bet that those who are having problems with Gmail will find that the username for the account listed in Mail for their gmail is not their full email address.
Thanks Csound1. Wish this had been more clear earlier. Cheers.