For GMail, you need to ensure “less secure apps” are not being prevented from accessing the account.
In the following, they’re talking about preventing access. If you need to, you can do the opposite to allow access (but be sure you’re aware of the risks):