Unable to connect to SMTP server

I am unable to configure SMTP server settings. It gives an error stating unable to connect to host. I tried with gmail.

***Update
Issue has been resolved. Google has disabled less secure apps settings. Done with Outlook.