Well, if you have access to you gmail account and your device has an active data connection then you can reset the password, Still if you don't have an active data connection, hold the power button for 3sec a popup will appear use
it to activate "data network mode" once it is activated go to "google.com/android/devicemanager?hl=en_GB&u=0" now you will be seeing your device location click on the Lock button and put on the NEW PIN, confirm the PIN and done not take your device and put on the PIN you have entered through your PC.
You will get back the access of your device and there is no need of any factory reset or wipe.
But if you don't have your gmail account access then I am afraid but you need to do a factory reset,
i.e. it can be done by holding power and volume down button until you get the Android screen showing warning message, then once you pass through it use the volume up and down button to rect erase or wipe ..... and use the power button to confirm. Caution: Using this option remove your all saved data etc
.... I would say only use this option if you don't have access to gmail account.
Recommended editorial content
With your consent, external content is loaded here.
By clicking on the button above, you agree that external content may be displayed to you. Personal data may be transmitted to third-party providers in the process. You can find more information about this in our Privacy Policy.