G2P2001 is obstetrical/gynecological terminology for how many times a person with a uterus has been pregnant and given birth.
Specifically:
G2 = gravida ("heavy") = 2 pregnancies
P2 = para ("equal") = 2 live births
001 = addition of preterm (0), abortions (0), and living children (1)
So, this would indicate the person had 2 pregnancies to term, gave birth to 2 children, but one of them passed away.