Trouble setting up gmail

Please take a look at screenshots and let me know how I can resolve my issue.  I am unable to connect my gmail.  

Also, need to confirm if imap is the best settings to use for gmail

SSL port should be 993 not 143

I changed my imap port to 993 and it’s still not working.

I have for imap chosen use SSL/TLS on special port (legacy) and it works