The second time, I didn't get this error message, so it looked like the account was successfully created (it appeared in my accounts list in the settings of those apps), but nothing was synced: both apps (mail / calendar) remained empty. The first time, I then got a Windows message 'Something went wrong', followed by an error code (I didn't write it down). Each time I was able to complete the following steps: I tried deleting my Google account from the mail (or calendar) app, by going to 'settings -> accounts', and then re-creating the account.
For a while I was able to sync my Google account emails (Gmail) and calendar in those apps, but about a week ago, it has stopped working: the calendar is empty (no events, and no calendars listed), and the emails that were already synced are still there, but syncing doesn't bring any new email. I'm having a problem with the default Mail and Calendar apps in Windows 10.