This is gmail refusing your connection to port 465.
There are a few things to check.
Firstly, have you set gmail to allow less secure apps? You’ll need this to be set to allow less secure apps. https://support.google.com/accounts/answer/6010255
Secondly, do you have any filtering enabled that could be blocking port 465 on your network connection? If so, disable this.
Good luck!
Also check if the port number is correct. In few examples I have noticed the port number is 587. It depends on your setting, whether TLS/SSL is enabled or not.
If your gmail is blocking, then you will also see an email when you login to the actual GMAIL account about the possible block and instructions to unblock.
Your java action is confusing me. It seems the java action is in your own module.
Have your written custom java action yourself? Or are you using the SendEmail action from EmailTemplate module?
If you use the SendEmail action from EMailTemplate module then the Java action should have some parameters already.
See the image below for your reference.