But Google! I really want to authorize this server to access my email!
Email notification from Google about the blocked sign-in attempt.
It turns out that in order for Google to authorize a third party server to access your account via SMTP now, you have to enable “Less Secure Apps” on your Gmail account. You can read a full explanation of the risks of that here, but essentially, any apps that aren’t using security protocols that Google deems mandatory will be blocked unless you enable the ability for less secure apps to access your Gmail account.
Now while I won’t recommend you allow less secure apps to access your Gmail account, it’s currently the only way I know of to allow WordPress to use your Gmail account to send outgoing mail. If you do choose to enable less secure app access, you can do that on this page in your Gmail account. There’s a screenshot below of where you’ll find the setting. Please don’t enable this access unless you fully understand what’s going on, and what the possible ramifications are.
Ref: https://www.wpsitecare.com/gmail-smtp-settings/