It is astonishing how simple it is to import contacts from iPhone to Gmail and more, if not less surprising, how many people have no clue about it. The procedure requires syncing the iPhone contacts with Windows Contacts and then exporting them to a CSV file, the last step is to import this file using the build-in Gmail import feature.
Note: You can sync the contacts directly with Gmail as well, but this guide is only for those who want to Import the contacts into Gmail and add them into specific group.
First make sure to select sync contacts with Windows Contacts from iTunes.
Once you find all the contacts in Windows Contact format inside the [Username]/Contacts folder, hit Export to save them all in CSV format.
Now head over to GMail and hit Contacts from the left sidebar. Now click Import link on the top-right side to visit the Import page. Here you can browse for the CSV file and hit Import to begin importing them to Gmail contacts.
Additionally you can also choose to add these imported contacts to a new group or an existing group. This grouping of contacts cannot be achieved when synching directly with iTunes.
This method is useful if you want to add certain contacts in one group. Just create a CSV file of selected contacts and import them to one group, and follow the same procedure to add other contacts to different groups.
This method is valid if you have Windows 7 since it has a build-in option to export all contacts to CSV format.