Ok, I just switched from AT&T to T-mobile and had this exact problem. Here is what worked for me:
I needed to first follow the directions from T-mobile's website on how to manually dial the voicemail account:
1. Press and hold the 1 on your devices's dialpad to call and connect to your voicemail.
2. If prompted for a password the first time you access your new voicemail account, use the last four digits of your mobile number.
3. When prompted, create a password. Your password can be any 4- to 7-digit code. A good password is one that’s easy for you to remember, but hard for others to guess.
4. When prompted, record your greeting and name. Your voicemail is now ready to use.
Once I did that, I could then go into the voicemail tab of the phone and set the password to the one I just set over the phone. After I did that, voicemail seemed to work like it did before I switched carriers.