Can you get back to Mail / Preferences / Accounts and delete the gmail account? Or are you locked out of Preferences?
If you cannot do that, try this. Quit Mail.
There is a preferences file in your Library (User / you / Library) called
(Note there are two Library folders. The file you want is in the user's library.)
Trash it and restart Mail.