Thanks for sharing the details. Based on the error that you are getting here 530 5.5.1 Authentication Required, I suspect that it might be related to the settings on Gmail side itself. With reference to the following article:
Can you please check if the suggestions of enabling the less secure apps or the rest of suggestions work for you?