Mail, Contacts & Calendars refuses to connect to Google
According to this Gmail help forum thread this is an issue that is fixed in Mac OS 10.10.3. There user jbrandtAUS writes on the 29th of May:


  From others I have talked to, starting yesterday, people have not been able to add their Gmail accounts to Mail or System Preferences > Internet Accounts if they have 10.10.1 or 10.10.2... if you update to 10.10.3 it will work


So the solution is to upgrade to anything above Mac OS 10.10.2.