Welcome to Android Central! How new is it? If it's pretty new, bring it back to T-Mobile and ask for a replacement.
If it's too late for that, try booting into Recovery Mode, and then see if you can wipe the cache partition. First, power down by pressing and holding the Power button for about 15 seconds until it forces a power off. Then follow these steps:
http://forums.androidcentral.com/nex...-recovery.html. Be aware that the process can take up to 10 minutes.
If that doesn't help, you could try flashing the factory image.
[TUTORIAL] How to flash a factory image | Re… | Google Nexus 5 | XDA Forums