If the store that sold you your phone transferred your contacts over from another (non-Android) phone and you didn't already have those contacts in Gmail, then it can be difficult to get them from the phone's "Phone-only" contact storage to Gmail. You'll probably need to export them from the phone to a PC/Mac and then import them into Gmail from the PC/Mac.
If you have contacts in Gmail and you're just trying to sync them to the phone, then you just need to enter your account info into the phone. You also need to go into Settings/Accounts-&-sync and check the "Background data" & Auto-sync" boxes. Then tap on the Gmail account below and may sure that the "Sync Contacts" box is checked.