Google’s “Less Secure Apps” system has always been annoying, and IIRC they will actually remove it completely this year. Instead, you should enable two factor authentication and use an App Specific Password to login instead.
The process is detailed in the setup instructions of our example contact form: