I was in psychotherapy for over a year. Why was I still having pain if it was psychologically induced?  in fact, my therapist thinks the pain is somehow psychological but he has never heard of tms.

TMS. If you meant tension myositis syndrome (tms), then it is mostly back pain of psychosomatic origin. The symptoms include pain, stiffness, tingling, numbness & weakness. The tx involves education, resuming normal life styles , support groups & psychotherapy.
Pain where? Where is the pain coming from? It is tough to answer since there is not much information provided. Tms helps with depression so are you referring to depression and pain? Repost with further details or leave a comment to answer you further.
Many causes. A failed psychotherapy can have many causes: poor doctor-patient match, therapist failure, patient too defended, the pain serves a psychological purpose that's hard to give up, etc. Maybe one year wasn't enough. Or maybe the pain wasn't psychological after all. Really can't be answered without knowing specifics. I'm unclear what tms, a brain treatment for depression, has to do with this.