From 30 May 2022 , Gmail has stopped to allow less secure apps,
So, Alternate Solution for this is -
- Turn On two step verification
2.Generate the app Password and use that password in Imap Activity , it worked for me
make sure below , ‘Enable IMAP’ is on