I too, have the same problem, it all started in the past few days.
I have 3 gmail accounts, the other two are NOT affected and all three have identical settings...Just ONE of them is no longer working. The error messages I keep getting every minute or two in Mail are always different:
Additional information: The connection to the server “imap.gmail.com” on port 993 timed out.
or
The server returned the error: Account exceeded bandwidth limits. (Failure)
or
trying to log onto the IMAP server imap.gmail.com has failed. Make sure your usenermame and password is correct....
BUT, this only affects my 1 account, I've got 2 others that are active AND WORKING in Mail.
I *CAN* access my mail from the web, this is wierd!
Additional information: I am having a similar problem on my iPhone mail app, with the same account, the only difference is that the error message I am getting is "password not provided, go to the settings and type your password" or something similar. Needless to say the password isn't missing...
If anyone has any clue please feel free to give me some advice...