I know this is an old thread, but since I just went though this, i'm sure someone else will. I posted this on another forum:
I just went through the process of locking my phone because I forgot my pattern. I tried to unlock using my gmail account information and it was not working, but I finally figured out what the problem was and was able to unlock. I'm wondering if this has caused problems for others.
A few months back I started using the Google two-step authentication. Essentially what this does is employ the use of verficiation codes for certain applications. Some applications cannot use the verification codes, so Google allows you to create application specific passwords for those applications. Gmail on an android phone is one of those applications.
The application specific passwords are a string of 16 (i believe) random characters. I had forgotten about this completely and kept attempting to use my real gmail account password. Once I realized that I was using the wrong password, I went to the following page:
And I revoked the password for my phone and then generated a new password. I was then able to unlock my phone. Once you unlock your phone, you have to use the same password to authenticate your phone back to your google account. I did that and was then asked to create a new pattern.
Hope this helps someone.