It will work fine. Band 4 UMTS as well as bands 2, 4, and 12 for LTE are all available on your device and used for T-Mobile.
syaoran gave some great info in the post above. You can always use our BYOD & SIM Cards | Bring Your Own Phone | T-Mobile Sim Card page to check the compatibility with the IMEI. We can't always guarantee devices from other carriers will work, but it's got a great chance if it supports our network bands. Best of luck!
Manage your T-Mobile account