gmail smtp settings for Apple’s Mail client (mail.app)
Try using port 465. Seems to be a specific port that gets around some blocking and some of Apple mail’s weirdness. Other working (sometimes) ports are 587 and 995. All ports require SSL.
Apparently there are events which trigger google to lock your mail account. To unlock you must complete a captcha at https://www.google.com/accounts/UnlockCaptcha?