Step 1: Get Your Contacts, Calendar Entries Into Google
Syncing with Google will erase the contacts and calendar entries on your iPhone, so if this data isn't stored in Google yet, you'll first need to copy the contacts and calendar contents to Google's server.
Google has provided very useful instructions for this process:
Instructions for Windows Users
Instructions for Mac Users
Step 2: Setup Google Sync on the iPhone
You must now setup the iPhone to sync with Google Sync over the air. This Push service keeps Contacts and Calendar entries synced across both your iPhone and Google Calendar / Gmail.
Google has also provided instructions for setting up your iPhone for Google Sync:
Instructions for Setting Up Google Sync on iPhone / iPod touch
Google Sync... Push Contacts & Calendar, AND Gmail!
For years, Google Sync did not support Push Gmail for the iPhone, but a recent update to the service added this functionality. Now Google Sync supports Push syncing of Contacts and Calendar entries as well as Push Gmail.
For more information on setting up Push Gmail on your iPhone, click here.