If you're still trying to use Gmail with IceDove without "allowing less
secure apps" in Gmail, you can enable 2-step Verification in Gmail
https://www.google.com/landing/2step/
and then set up an App Password
https://support.google.com/accounts/answer/185833?hl=en
to use in IceDove. I just did this to resolve the same issue in Evolution.
Note that setting up 2-step Verification will require you to temporarily
enable JavaScript in Gmail. I'm willing to make compromises like this that I
only have to do once and facilitate my transition to free software, but RMS
might not approve.