Using Two-factor Authentication Secured Google Services on your iPhone

Problem

You sync your Calendar or Contacts on your iPhone with Google’s CalDAV and/or CardDAV. But enabling multi-factor authentication for your Google Account causes the synchronization to fail. Because you know, you cannot enter the second factor somewhere.

Solution

A simple fix to keep using the secure 2-factor authentication but have your data synchronized using password authentication, you can expose certain services using a password by setting up service-specific passwords in the settings of your Google Account.