If Microsoft Outlook cannot connect to Gmail and keeps asking for a password whenever you try to add a new Gmail account, you are not alone. This problem also happens with an already added account. Here are some suggestions that can help you solve this problem.
Outlook cannot connect to Gmail
The main reason why it happens is that you are trying to add a Gmail account that has two-step verification enabled. The Windows Mail app can provide the actual Gmail login prompt, but Outlook doesn’t do that. Instead, it shows the native window where you have to enter the username and password once.
To solve this problem, you need to enable IMAP and use App Password to login. Although the IMAP should be enabled by default, you still should check the settings. Open your Gmail account, click on the settings gear icon visible on the top-right corner and select Settings. Switch to Forwarding and POP/IMAP tab. Make sure the Enable IMAP item is selected, and the status is IMAP is enabled.
Now, you need to create an app password. An App Password is a one-time password that you use instead of verifying yourself with two-step verification. To do this, open your Gmail account > click on your profile picture > click on My Account.
Next, go to Sign-in & security. Scroll down and find out App passwords.
After that, you need to enter your Gmail account password again. Following that, you can choose an app and the device from the drop-down menu. After that hit the GENERATE button.
You will find a password on your screen immediately. Use that 16-digit password in Outlook instead of the regular account password.
You should not see any error after that. Now you need to perform these two steps repeatedly for every Gmail account that you want to add, if you get such errors.
You Should also check if "Less Secure Apps Allowed" is enabled in security settings. Please refer to Google documentation bellow.