Peritonitis is an inflammation of the peritoneum, the thin layer of tissue that lines the inside of the abdomen and covers most of its organs. In the context of gynecology, it often arises from infections or complications related to the female reproductive organs, such as the ovaries, fallopian tubes, and uterus.