Where you have a third party system that only allows entry of a username & password this is how you grant access to your Google Account in a secure manner.
Let’s say you have a booking system, CRM or ERP that needs to send email on your behalf. These systems often will allow you to send via gmail.com
Note that this is not recommended as you may exceed gmails sending limits. If you are in danger of this then you should consider a transactional email platform like https://postmarkapp.com
This video walks you through how to generate a password for an app like this.
NOTE you will need to secure your account with Two Factor Authentication
Once done you can use your primary account address and the generated password in the application to allow it to send email for you.