'2-Step Verification' is Google's version of two-factor authentication. It means that whenever you log into your Gmail account on a new computer, you'll need to verify the login from your 2-Step Verification phone.
Open up the keychain application and locate the password that it has stored for your gmail account. Now delete it.
Then retry the process you have, ensure you put in your application specific password, and then ensure you press the checkbox that says to save password to keychain. Further instructions and Mail.app specific screenshots. I believe that mail.app is using an older stored email and this is preventing access. I am assuming of course that mail.app was working perfectly for you before you started using two step authentication.