Just went through lots of trouble dealing with google apps and imap/pop3 access for a client. The problem turned out to be that the account was locked. The fix turned out to be their unlock captcha tool. There is one for straight gmail located at https://www.google.com/accounts/DisplayUnlockCaptcha and the other for google apps at https://www.google.com/a/[domain.tld]/UnlockCaptcha
I hope this is helpful to someone.