Occasionally GMail will stop sending or receiving mail claiming your password is wrong;
"The user name or password for imap.gmail.com is incorrect"
You're positive the password is correct, but that's no help.
To fix this:
- Log out of all clients – mobile, desktop, app, browser etc. – that are logged into the GMail account.
- Open Safari on the affected iPhone and go to http://www.google.com/accounts/DisplayUnlockCaptcha.
- Enter your GMail address and password.
- Open the mail app, mail should flow properly now.
For some useful comments on this issue, see http://www.iphonefaq.org/archives/971486
Note: Is your outbound mail configuration in GMail/EasyDNS messed up?
See Outbound Mail on EasyDNS with GMail.