In Google Mail, you must allow "less secure" apps access in order for your SMTP settings to work. There are two places this setting must be enabled:

 

Once enabled in both places, you're good to go!

Please note that these options are not available if you have two-factor authentication (2FA) enabled for your Google account. Instead of using SMTP, you will need to connect your mailbox to Google via OAuth if you are using 2FA.