The iPhone is locked to the previous owner's T-Mobile account.
T-Mobile will not unlock the phone for you, because the phone is not assigned to you.
Your only hope would be to contact the person that you bought the phone from and have them contact T-Mobile to have the phone unlocked.
As you might imagine, there is not much incentive for the former owner to do this, since they already have your money and would have nothing further to gain by having the phone unlocked.
Your best bet would be to try or a refund, if the seller has not already disappeared.