Google has just released a new tool called Google Sync using a Microsoft Exchange Server that enables you to automatically sync your Google Contacts and Google Calendar events to your iPhone or iPod touch.
After setting up Sync on your device, it will begin synchronizing your address book and calendar over-the-air. Sync automatically pushes any changes or additions you make to your Gmail Calendar or Contacts, whether through your Google account or on your handheld. Also, because your data is automatically backed up to your Google account, it's securely stored even if you lose your phone.
Last, if you and your co-workers also use Google Calendar to set up meetings, you'll be notified within minutes of any changes.
You can only set up a single Microsoft Exchange account on your device. If you're already set up for another Exchange server you won't be able to use Sync, unless you remove it.
Google explains how to configure Sync for your iPhone or iPod touch on its Sync support page. Here's a quick overview:
First back up your data using iTunes — do it or lose it! Next, open Settings on your iPhone and navigate to Mail and then tap Microsoft Exchange at the top of the screen. Enter your Google email and password where indicated. Tap the Next icon. Enter m.google.com for Server. Tap Next again, then tap Sync twice and you're done.