Hi, and thanks for your medical question on eHealth forum!
Usually pain during the initial stages of penetration is due to UTI and vaginal infection or vaginitis, a tight vaginal wall, sores at the mouth of vagina or vestibulitis, vulvodynia or a dry vagina (frictional injury), rough sex, in first timers, vaginal tears, thrush or fungal infection.
Pain on deep penetration is due to pelvic inflammatory disease, endometriosis, irritable bowel syndrome, pelvic tumors, cervical and uterine infections, polycystic ovary, and tumors. It an also be due to ectopic or normal pregnancy. Depending on the site of pain during penetration, diagnosis can be made. This can be further confirmed by clinical examination, ultrasound abdomen or CT scan, PAP smear and a STD panel as required.
It is difficult to comment beyond this at this stage. Do discuss this with your gynecologist. Take care!