Unable to log in to gmail in Mail app
I have two iMacs - the one at my office began to say "login failed" in the Mail app a couple weeks ago (iMac running Catalina version 10.15.7). It did not ask for a password. (My iMac at home works fine.) Today I deleted the gmail account from Mail and tried to re-add it to my Internet Accounts. I entered my gmail email address and got a Google authorization screen. I confirmed on my phone in the Google app "yes" that I was trying to sign in from another computer. I then entered the number shown on the Google screen. My Mac showed the following message: "Authentication Failed - Failed to authenticate with Google, please try again later". However, in gmail I received an email saying "macOS was granted access to your linked Google Account." It seems that the problem is with my computer, not with gmail. Any help would be greatly appreciated.
iMac, OS X 10.10