iMac says Connection Insecure. Failed to verify the server certificate
There's another thread about this, but it is expired. Yesterday I changed my Gmail password, and suddenly my old iMac's Gmail (High Sierra) would no longer connect. I got this dreaded "connection insecure - failed to verify the server certificate". All the solutions I found online were either about removing expired certifcates or turning off virus protection. Neither of those were my problem, the solutions did nothing.
I think Gmail has changed their technology so that it is no longer possible to add or edit an account through the regular "Google" mail UI, when you are on an older OS. I almost gave up, then I ran across a forum post on MacRumors called "How to Set up Gmail on Apple Mail?" (I would post a link but maybe that is not allowed?)
Anyway the solution is to use Google's "App Passwords". You create an App Password in the security section of your Google account. Then in the Apple Mail program, you create a regular old "Other" style email Imap account (NOT "Google"). Put your google email address and user name in there, use the default in and out servers, and instead of your password, you put in the App Password (without the spaces, it's just 16 characters). Voila, it finally worked...
iMac 27″, macOS 10.13