Outlook can’t connect to Gmail: Password incorrect

When configuring your Gmail account in Outlook (or other mail clients such as Thunderbird and Mail apps on (older) smartphones), you may run into continuous password prompts or sync errors. This is because Google has turned off Basic Authentication by default for all new accounts and accounts which haven’t synced within the last 30 days and only lets you authenticate via the OAuth 2.0 standard.