Just spent an hour on a really frustrating problem with Google. What they did makes sense but the error messages are really hard to fathom
If you have MacOS Catalina and are trying to setup a gmail account on it. It doesn’t work the way you thjnk.
Authentication now happens from Safari to get mail to work. So you need to go to Safari logout of your google account after a Catalina (OS X 10.15) and then login.
It will ask if you want these credentials you work all over MacOS. What this means is that you me you do the login it will work for Mac mail too. Say yes. And bizarrely a Mac Mail dialog will come up asking which Gmail features you want. Like calendar and contacts. So one login works.
What I think is going on
Well google has been tightening security over the years. With older releases if you have two factor authentication you had to get an app password which was very insecure.
Sometime last year they discontinued this and in Mac mail when you add an account, it would actually do a web authentication and push you to Safari. This was way more secure because it’s a real google site and it just does a call back indicating success when done. So in 10.14, whenever you got a minor release you would have to reauthenticate all the apps.
The problem is that the error messages don’t help at all. If you try to login from the system preferences it seems to work but you get “login failed” and no indication you need to go to Safari.