While I was out, someone attempted to guess my phone password. They couldn't guess it and now it displays the 'too many password attempts' screen, which needs to be unlocked with a google account. However, my google account is not working. I enter the username and password correctly, and have attempted to do so about 10 times. So why is it not unlocking? Do I need an internet connection to unlock it?
You won't need an internet connection.
Also, when typing the username/email, make sure you have either @gmail.com or @googlemail.com at the end, depending on what it was when you added the account.
If you didn't add anything, the default for android <= 2.3 is @googlemail.com
I've read Recovering from forgotten lock pattern which states that there is an option to disable the lock using my Google account information. However I did not noticed such an option when I entered my password five times wrong. (Although there was also a 20s or 30s delay to complicate brute force attacks.) I use Android 4.0.3 on a Asus Transformer Prime TF201.
Would factory reset work?
Install Screen Lock Bypass (free) from web interface of Play Store. It'll not reset/remove your PIN, but unlock your device on each reboot.
If you want to permanently reset/remove PIN, you'll have to purchase its pro version.
In the last, you can always factory reset your device if these apps are not working for you. Factory reset wipes out all custom configurations including PIN/Security Lock.
I don't know if you were able to unlock you phone, but what I would like to suggest is once you are able to unlock your phone then get a great app vipsha2 - Remote Phone Screen Lock from Google play. This app has helped me a lot and its free. We just need to send an sms from other phone and we can lock or unlock our phone.
Edit by Izzy:
As the following screenshot shows, you set up an "attention word", which then has to be send by SMS to trigger the Lock/Unlock. Not sure where the password comes into play, as I do not use this app.