"Retrieving Gmail password in Mail App: So I have a gmail account setup in Mail and it works fine but I've forgotten the password to that account so I can't login through the browser. Can I access this password through Keychain?"
-------
Troubleshooting gmail:
With gmail, you would have used an app password to use it. It is a one-time password. So, a new app password is what is needed here. So, try creating a new App Password. Something typical for a new device, or when eMails are not sending and/or being received. You would log in using that password, rather than your Gmail password.
Go Here: Sign in with App Passwords - Google Account Help - Google