This phase II trial studies how well modified vaccinia virus ankara vaccine expressing p53 (p53MVA) and pembrolizumab work in treating patients with ovarian, primary peritoneal, or fallopian tube cancer that has come back. Vaccines made from a gene-modified virus may help the body build an effective immune response to kill tumor cells. Monoclonal antibodies, such as pembrolizumab, may interfere with the ability of tumor cells to grow and spread. Giving p53MVA and pembrolizumab together may work better in treating patients with ovarian, primary peritoneal, or fallopian tube cancer.