To resolve Gmail SMTP ERROR: Password command failed when sending mail on the contact form, check the following:
1. Check Gmail SMTP settings, username, password, port
SMTP hostname: smtp.gmail.com
SMTP port: 587
SMT Secure: tls
SMTP username: your gmail account username
SMTP password: your gmail account password
2. Check 2-Step Verification on gmail account , if it is on, disable it.
3. Check less secure apps on gmail account, if it is off, enable less secure apps.
4. Check display unlock captcha on gmail account , enable it.