Phobias are 'as mccfluff points out' irrational fears.Being claustrophbic isn't stupid,lots of people suffer from this but it probably does stem from your childhood,perhaps someone locked you in a cupboard as a joke, that sort of thing.Whether you can remember anything like this or not,please take it from me, and I speak from experience,the only way to get over a phobia is to do whatever you are afraid of and keep doing it until one day the fear will have gone.
Start off small,and work to do more next time.Go somewhere and just stand and look at a lift,when you feel ready, step into the lift and straight out again.Again,when you feel ready go up 1 floor.It's all easier said than done and you may need some medication to help you, but if you work hard at it, you will overcome it. Good luck.