The first step, sync contacts with iCloud, then export iPhone contacts to computer through Google web browser, open the site of icloud.com, then sign in with your iCloud account. Click "Contacts" and hit the settings icon and choose "Export vCard" to save contacts from iphone on your computer. Lastly, import contacts from computer to Gmail. Log in your Gmail account and click "Contacts" in the left sidebar. Here, you can click "More" option and then choose "Import" > "Choose File" to find and import vCard file on your desktop computer.