If you get a message "cannot get mail username or password for IMAP.Gmail.com is incorrect" this video will show you how to fix it.
What is Gmail's 2-step verification?
Gmail's 2-step verification is an optional level of security that not only requires your password, but also a passcode that gets sent to your phone via text or voice. Any computers you mark as "secure" will only require you to enter the code once every 30 days, but all other computers will require you to enter it every time.
Some apps and services do not yet support Gmail's 2-step verification. Three of those apps includes Apple's built-in Mail for iPhone, iPad, and Mac. The good news is that Gmail has provided an alternate method to increase your security -- requiring a separate, auto-generated password for each of those apps.