Microsoft disabled basic auth.
Gmail supports a method of connecting to accounts from Yahoo, AOL, or Outlook (or Hotmail) called Gmailify. This method supports Modern Authentication (OAuth). To set Gmailify up follow the "add an email account" option in Google Mail Settings > Account and Import. Once you've entered your remote email address, you should see a OAuth screen.