I also had the same problem when needing to restore my iPhone from backup. I'd set the password on my iPhone backup many years ago and restored my phone from backup a few times over that period. However this time I found my password no longer worked, nor any combination I could possibly think of.
I ended up downloading the free trial version of Elcomsoft iPhone Password Breaker, created a custom dictionary list with all possible passwords and combinations and words I could think of and set it to maximum mutations. Within 30 seconds it came back and said it had found my password, however I would have to buy the full version for the password to be revealed to me. However, it did show me the first 2 characters and the length of the password and I was able to guess from there.
The password ended up being my name in lower case, which is also the name of my iPhone in iTunes, i.e. "Kobe's iPhone". There is no way on earth I ever would have set my name as my password, so my best guess it that iTunes changed my password during one upgrade or another. I don't have a PIN set on my phone like the other people above do, so this could be another variation of iTunes setting your password for you. Needless to say, I've now changed my password back to something more secure.
Hopefully this info will help other people in a similar situation.
Thank you man!!!!!!! You saved my life!!! I ran the Elcomsoft Phone Password Breaker yesterday after reading your post but it didn't work. I added a few more possible passwords and it worked, took 192second tho, which was longer than your 30sec. I'm soooooooo grateful that you came up with this solution!!!! Really appreciate it!!!!!!