Let me suggest a few things you can try (if you haven't done so), while you are waiting for Kostya's reply:
I hope you've read the suggestions at the URL included in the server response:
https://support.google.com/mail/answer/78754You said you've enabled "less secure apps access".
1. By any chance, do you have the 2-step verification enabled? (I remember at some point Gmail was very annoying, nagging to enable that.)
2. I know that when I try to access emails for the first time from a new device or a new geography, I have to log in to Gmail via web browser, and essentially confirm that it was/is a legitimate attempt. Usually there is an e-mail message in my Gmail account about that login attempt. If you have one, - try following instructions in it.
I hope one of these will resolve your problem.