It could be a condition called endometriosis,
I know this one well. It turns out that I have significant fibroids in my uterus, and that can cause the pain during sex. Also, I have a prolapsed bladder that needs correction. The gyn said to be sure to urinate every two hours, even if I don't feel like it, because an irritated bladder causes pain too.