So to set this up you first should backup you contacts. The easiest way to do this is to sync you iphone contacts with google through itunes. Plug in your phone, open up itunes and goto the info tab. Select sync with google (and make sure your computer has internet access). Enter google username and password and then hit the sync button. This will upload all you contacts from your iphone to you google contacts. Once that is done follow the instructions found here to setup over the air syncing of google calendars and contacts.
Finally, open up the browser on you iphone and navagate to m.google.com/sync to select which of you google calendars will be synced with you phones calendar....easy as pie.