Assuiming you are talking about an android phone then your gmail password should ideally unlock the phone.
If the gmail password is not working for you, then probably you would have to hard reset your phone.
Warning: Doing a hard reset will erase all the programs, settings and data. So be careful before you do it and make sure you have a backup. Contacts and emails from gmail can be re-synced. You will loose your sms or call logs if you don't have backup. Data on SD card will however not be deleted.
For doing a hard reset you need to go to recovery and do factory reset.
Steps:
1. Turn off your phone.
2. Depending on you phone (since you have not mentioned the phone name)
press volume down+Power button and keep it holding till it boots to recovery menu.
Go to the wipe data/factory reset option. Confirm by pressing the Home button.
After doing a Hard Reset reboot the phone to and then you would have to configure the phone as you did it for the first time when you bought it.

