I have tried to connect my gmail account to the Mail app and Google calendars to the Calendar app. In both cases the authentication is failing. I've triple checked that the credentials I am entering are correct.
Because the apps don't currently support OAUTH (a requirement by Google), you have to tell Google to allow "less secure" apps ( https://support.google.com/accounts/answer/6010255?hl=en ). Or you can wait for the next release of the "Online Accounts" panel: https://imgur.com/CYSc9Vl
You should have an email in your gmail inbox that says as much. :)
Just generate App Password in your Google Account. You need to do it separately for each calendar you want to connect and separately for the mail. Now, when credentials window pop up you use App Password instead your account password.