So it is hard to know exactly what the issue is here, but assuming the server details are all correct, I have had issues in the past with gmail rejecting the login. On your gmail account there is a setting to allow login from less secure apps which needs to be enabled before this will work. Maybe there is a similar setting for exchange?