Painful sex.

Amanda
So I'm almost 21 weeks along and hubby and I haven't had sex since I was about 12 weeks because I've just really not been in the mood and have had multiple bladder/vaginal infections. 
Tonight we had sex. I was so excited to because it was the first time in a long time I've actually wanted to. Used enough lube and stuff so everything was going smoothly. But it felt like needles stabbing me all inside and like I was going to pee on myself. It was probably one of the worst sexual experiences I've had 😔 
Has anyone had this happen and what did you do about it? Is it just because my vagina hasn't been used in so long? (That sounds trashy but idk how else to put it) 
Thanks in advance.