If it was the same situation 2 months ago, I would say 100% the Galaxy S4.
But now, I would wait for the Galaxy Note 3 to be honest.
Or the LG Optimus G2 although I'm not sure when it'll be coming to T-Mobile.
But to answer your question, between the HTC One and Samsung Galaxy S4, I would get the Galaxy S4 hands down. I really like the extra features (Air view is REALLY useful, as well as palm swipe to capture screenshots and alternate between webpages while browsing). The camera is better on the Galaxy S4 despite what HTC fanboys say. The difference between 13MP and 4MP is huge and the Galaxy S4 just takes much better shots in daylight. If you're more of a night camera person, then the HTC One camera beats the Galaxy S4 here.
In terms of the UI, you either love Sense or you hate it. Same goes with TouchWiz. But then you can modify the UI's for both so I don't think this is the decisive factor.
The displays are not really comparable. The Galaxy S4 uses Super AMOLED which is newer technology than LCD. The Super AMOLED = deeper blacks, better contrast, better motion performance (higher refresh rate) and more saturated colors. The LCD of the HTC One is really good as well... basically better brightness and more natural colors, but at the expense of lower contrast, less black levels and worse motion performance (you would only notice a difference if compared side by side when playing videos).
However the biggest factor for me was removable battery and microSD. I really like that you can easily replace the battery on the Galaxy S4 if you're sitting in a long conference and you're making many phonecalls a day... it really is a useful bonus. And if you're the type who goes on long roadtrips, plane flights or are a businessman, then the Galaxy S4 will last you a lot longer because it has that removable battery. When one battery is dead, then just pop in a newly charged one and it's back at 100% again.
In terms of overall battery life, I heard they're about equal. Not 100% sure on this one, maybe those who own both can comment on this particular detail.
The design language is obviously different. HTC went for a more industrial and robust design with aluminium back and stylish metallic speaker grills at the front. Samsung opted for a more conservative glossy plastic design which you either love or hate. I don't particularly mind the plastic of Samsung phones because it's sturdy and durable. Also I dislike it when metal becomes cold, moist and sticky... It really depends on what type of person you are.
But to me the factors that matter the most are: removable battery, microSD, the tons of extra features like Air view, palm swipe and the array of sensors... in the end you're definitely getting your money's worth on the Galaxy S4.
So:
If you like new technology get the Galaxy S4.
If you don't like polycarbonate/plastic and prefer metal, get the HTC One.
Oh and the other big factor for me was screen size. Just be really careful when you decide between the Galaxy S4 and HTC One. Don't let their similar overall physical sizes fool you. There is actually quite a big difference in screen size... the Galaxy S4 has a 5 inch display, whereas the HTC One has a 4.7 inch display. This isn't immediately apparent but after using the HTC One, I really think the 4.7 inches was too small for me.
The Galaxy S4's display has an option to become a super-sensitive input device and will be especially beneficial for people living in colder climates. The display can be utilized even with gloves on if a setting called "High touch sensitivity" is enabled. You can't do that with the HTC One.