I have a few users who get errors when trying to IMAP or POP their mail from google hosted (gmail users can also run into this problem). If your settings are correct and everything was working and has just stopped, you may need to un-lock your account via Captcha.
Exactly how accounts get locked is a bit of a mystery. Although, I have a feeling it has to do with checking an email account too frequently, and maybe from multiple devices coming from a single IP address.
For the solution please follow the steps below to resolve the problem:
- Disable all mail clients you’re using to read Gmail messages. (If you use one at work and one at home, please disable both.)
- From the computer on which your logins are failing, visit http://www.google.com/accounts/DisplayUnlockCaptcha
- Enter your Gmail username and password, and the letters in the distorted picture.
- Once you have successfully logged in, restart your mail client and try to download your mail.
If you’re using a Google Apps email address, please instead follow the steps below:
- Disable all mail clients you’re using to read mail. (If you use one at work and one at home, please disable both.)
- From the computer on which your logins are failing, visit https://www.google.com/a/[your domain].com/UnlockCaptcha. Be sure to fill in your domain name in the URL.
- Enter your email username and password, and the letters in the distorted picture.
- Once you have successfully logged in, restart your mail client and try to download your mail.
Sources: