Go into your gmail settings and make sure IMAP is enabled:
Next go to:
myaccount.google.com, select Security, and then 2-Step Verification:
Click "Get Started" and follow instructions to setup 2-Step
Verfication
This is required for the next step.
Once you have 2-Step Verfication setup, search for and select App
Passwords
Enter app name "myezinbox" and create a password.
Make a copy of the password, this is the email password myezinbox will
need.