In the last article I showed you how to activate Two-Step verification for your Google account. Now I'm going to show you how to create and use an application-specific password for Gmail.
Log into your Google account at myaccount.google.com:

Go to Security in the left sidebar. 2-Step Verification must be on.

Click on 2-Step Verification and scroll down to the bottom:

Now click on App passwords. Enter the name of the application.
Click on Generate:

Now you can use the app password in the application.
Sometimes there is no App specific password section available. In this case go directly to App specific passwords for your Google account
Updated 04-Jun-2024 with shortcut to App Passwords.
Updated 11-May-2023 with new screenshots.
Updated 01-Apr-2021 with new screenshots.