Mac Mail forgets my email password every few days. How to fix it? I'm running Mac OS 10.8.1 and have a (personal) Gmail and a (work) Google mail account setup inside Mail client. Every few days (weekly?) Mail seems to forget my personal gmail password and I have to re-enter it again. 

This bug seems minor except that with Google 2 Factor authentication, this involves a trip to Google accounts and setting up another password etc. So this bug is hugely annoying when it manifests itself. I don't see this issue on iOS Mail (iPad as well as iPhone) nor on Outlook 2010.

I tried a solution at http://805creative.com/blog/what-to-do-when-apple-mail-keeps-forgetting-your-passwords.html but the plist in question doesn't exist on OS 10.8.1 ..

[UPDATE:] This can happen on either the IMAP (incoming) or SMTP (outgoing) servers. I just saw it happen on the incoming and then 5 mins later on the outgoing. Thankfully I misspelt the label of the outgoing server ('GMial') to notice it was complaining about a different server!
For years, and it still is true, I've had the pattern that Mail claims to have forgot the password but it's actually reacting to some other problem. If you hit the (Cancel) button on the "enter new password" dialog, you should find that it continues to work just fine.

At one time, this syndrome was clearly associated with network problems talking to the mail server (Microsoft Exchange, as it happened); I could tell this by correlating messages in the Console log. More recently, I haven't always been able to identify the underlying problem, but the trick of canceling the password prompt still seems to work all the time, for me.