@Fernando: The problem is Gmail is so secured that it's detecting an access to your account from an unusual place. That's why is asking you to log in a browser window.
I didn't deal with this case but I bet you could go to https://security.google.com/settings/security/apppasswords and create an specific password for this Odoo access. Use this password only for this service. Gmail would give your Odoo server access to your account but it'll prevent using the same password to any other one access case.
Ask me if I couldn't be clear enough.
This is the error message Odoo Warning Connection Test Failed! Here is what we got instead: -2 Name or service not known Now I have made some changes smtp.gmail.com instead of smtp.google.com But now I have this error message Odoo Warning* Connection Test Failed! Here is what we got instead: 534 5.7.14 Please log in via your web browser and 5.7.14 then try again. 5.7.14 Learn more at 5.7.14 https://support.google.com/mail/answer/78754 d3sm1093143wic.1 - gsmtp