How to connect iOS Mail app to Gmail with two-step verification
So you've already set up two-step verification in Gmail... 

(If not, now is probably a good time to do so.) 

But now that you have 2-step enabled, you can't use your old gmail password to sync your iOS Mail app to Gmail. You will have to sign into Gmail on your phone using a special app password which you can find by signing into Google at your two-step settings page:

https://accounts.google.com/SmsAuthConfig

Then click the "App-specific passwords" tab, and then the "Manage application specific passwords" button.

At this point you may see that you've already set up an app password for your device, but if you've recently reconfigured your two-step settings or activated a new phone, then you'll need to "Revoke" access and set up a new app password.

Set up a new app password for Mail by selecting "Mail" on my "iPhone" (or other iOS device) in the dropdowns and click "Generate".

Next, follow the directions provided by Google:


  
  Open “Settings” on your iPhone.
  Select “Mail, Contacts, Calendars”.
  Select your Google Account from the list of available accounts.
  Edit your account information and replace your password with the 16-character password shown below.
  


It's as easy as that.