Using Gmail SMTP requires some settings to be enabled in your gmail account.
Firstly, make sure you have gathered the correct settings for Gmail SMTP: https://support.google.com/a/answer/176600?hl=en
Next, ensure that you have configured the relevant permissions for using SMTP through your gmail account. We've found a great video that explains how to do this: