If you are talking about a screen lock password, then after a fixed number of incorrect entries your phone should prompt you for the password for the gmail account the phone is registered to. If that doesn't work, shut off the phone, log into the gmail account on a website and change the password using Google's password recovery
https://www.google.com/accounts/recovery?gaps. Once the new password is confirmed, turn on the phone and try using the new password.