Two-factor authentication adds an additional layer of protection to your Gmail account. With two-factor authentication turned on, every time you sign into Google or Gmail on a new computer or device, you'll be prompted to enter a code sent to you via a text message. This helps Google verify that you're the one trying to access your information.
- Go to Google's two-factor authentication page and click Get Started.
- Enter your password if required, then follow the step-by-step process. If two-factor authentication has already been turned on for your account, you'll see a message confirming this.

Once you've turned on two-factor authentication, you can create an app password for Gmail.
Step 2: Create an app password for Gmail
- Go to Gmail from your browser, then select the Google apps icon in the upper right corner of the screen.

- Select My Account. Under Sign-in & security, select Signing in to Google.

- Under Password & sign-in method, if 2-Step Verification is ON, skip to the next step. Otherwise, select 2-Step Verification and follow the prompts. When you're done, select the back arrow at the top of the screen.

- Under Password & sign-in method, select App passwords.

- Enter your Google password and then select Sign in. At the bottom of the next screen, select Mail and Windows Computer from the drop-down lists, then select Generate.

- Google will display an app password for you. Make a note of this password (without the spaces) and use this as the password when adding a new account to Outlook.

Use your app password to add your Gmail account to Outlook
-
Select Retry and then Next.
-
If Outlook asks you for your password, enter the app password you created in step 6 above, then select OK, and Finish to start using Outlook.