I've had this problem several times in the last year, after having it escalated several times, Apple's iCould techs have a solution... The problem is with the "Apple Token" that is used with the IMAP server. Here is the solution.
1) come up with TWO new passwords, make sure you meet the requirements. (8 characters long, at least 1 number, at least one capitol, no repeating letters) - You *WILL* need one, you *MAY* need two.
2) Log in to manage your Apple ID and change your password -
https://appleid.apple.com/cgi-bin/We...MyAppleId.woa/
3) Check and see if that worked. Some accounts will be fixed now. Others may need a call to Apple, if so, continue.
4) Call Apple Support, Get a Tier-2 iCloud Support Tech. Tell them you need the account put into "Troubleshooting Mode" and the password reset. They will verify your security question as well as your billing address.
5) Reset your password with the email the tech sent you to an alternate address.
Many will be fixed by step 3. I was able to fix 2 of my accounts like that, 3 of them had to be fixed by Apple's reset.
It appears that the "Apple Token" gets corrupted and they have no way to regenerate the token without a password reset.
Hope this works for you all.