Inclusion Criteria:
* Histologically confirmed high grade serous or endometrioid ovarian, peritoneal or fallopian tube malignancy that is metastatic and for which curative measures do not exist. The histology can be confirmed from tissue that was taken at the time of diagnosis. A biopsy at the time of recurrence prior to enrollment on study is not required
* Patients must have measurable disease, defined as at least one lesion that can be accurately measured in at least one dimension (longest diameter to be recorded for non-nodal lesions and short axis for nodal lesions) as \>= 20 mm (\>= 2 cm) with conventional techniques or as \>= 10 mm (\>= 1 cm) with spiral computed tomography (CT) scan, magnetic resonance imaging (MRI), or calipers by clinical exam
* Patients enrolled in the expansion cohort will be required to have archival tumor tissue available for analysis and be willing to have a tumor biopsy at baseline (after registration and prior to starting study treatment), at cycle 1 day 2 and at cycle 2 day 2. Patients must have platinum sensitive disease and be in their first or second platinum sensitive recurrence. Platinum sensitive disease is defined as recurrence that occurred greater than six months after completion of their last line of platinum based therapy. No non-platinum regimens allowed; prior therapy with PARP inhibitors as well as bevacizumab is allowed
* No more than two prior platinum based regimens. One regimen is defined as the interval of treatment from start of platinum based doublet to finish of that treatment course for the initial therapy or for the recurrent disease episode. If the nonplatinum agent is altered due to any reason other than disease progression, it counts as one regimen. For example, if a patient started on carboplatin and paclitaxel but developed a taxol reaction and was switched to carboplatin and Abraxane, this counts as one prior regimen
* Children are excluded from this study, but will be eligible for future pediatric trials
* Eastern Cooperative Oncology Group (ECOG) performance status =\< 2 (Karnofsky \>= 60%)
* Life expectancy of greater than 6 months
* Leukocytes \>= 3,000/mcL
* Absolute neutrophil count (ANC) \>= 1,500/mcL
* Platelets \>= 100,000/mcL
* Total bilirubin within normal institutional limits
* Aspartate aminotransferase (AST) (serum glutamic oxaloacetic transaminase \[SGOT\])/alanine aminotransferase (ALT) (serum glutamate pyruvate transaminase \[SGPT\]) =\< 2 x institutional upper limit of normal (ULN)
* Creatinine within normal institutional limits OR creatinine clearance \>= 50 mL/min/1.73 m\^2 for patients with creatinine levels above institutional normal
* Negative serum pregnancy test result for females of child bearing potential
* Note: The effects of M6620 (VX-970) on the developing human fetus are unknown. For this reason and because deoxyribonucleic acid (DNA)-damage response (DDR) inhibitors as well as other therapeutic agents used in this trial may have teratogenic potential, women of child-bearing potential must agree to use adequate contraception (hormonal or barrier method of birth control; abstinence) prior to study entry, for the duration of study participation, and 6 months after completion of M6620 (VX-970) administration. Should a woman become pregnant or suspect she is pregnant while she is participating in this study, she should inform her treating physician immediately
* Ability to understand and the willingness to sign a written informed consent document
Exclusion Criteria:
* Patients with platinum resistant disease or platinum sensitive disease that is past the first or second recurrence
* Patients who have had chemotherapy or radiotherapy within 4 weeks prior to entering the study or those who have not recovered from adverse events due to agents administered more than 4 weeks earlier, excluding alopecia. Patients with treatment related effects, such as peripheral neuropathy, that are grade 1 or less are eligible
* Prior exposure to gemcitabine
* Patients who are receiving any other investigational agents
* Patients with known brain metastases should be excluded from this clinical trial because of their poor prognosis and because they often develop progressive neurologic dysfunction that would confound the evaluation of neurologic and other adverse events
* History of allergic reactions attributed to compounds of similar chemical or biologic composition to M6620 (VX-970), carboplatin, gemcitabine or to these specific compounds
* M6620 (VX-970) is primarily metabolized by CYP3A4; therefore, concomitant administration with strong inhibitors or inducers of CYP3A4 should be avoided. Because the lists of these agents are constantly changing, it is important to regularly consult a frequently-updated medical reference for a list of drugs to avoid or minimize use of. As part of the enrollment/informed consent procedures, the patient will be counseled on the risk of interactions with other agents, and what to do if new medications need to be prescribed or if the patient is considering a new over-the-counter medicine or herbal product
* Uncontrolled intercurrent illness including, but not limited to, ongoing or active infection, symptomatic congestive heart failure, unstable angina pectoris, cardiac arrhythmia, or psychiatric illness/social situations that would limit compliance with study requirements
* Pregnant women are excluded from this study because M6620 (VX-970) as a DNA-damage response (DDR) inhibitor may have the potential for teratogenic or abortifacient effects. Because there is an unknown but potential risk for adverse events in nursing infants secondary to treatment of the mother with M6620 (VX-970), breastfeeding should be discontinued if the mother is treated with M6620 (VX-970). These potential risks also apply to the other agents used in this study, such as carboplatin and gemcitabine
* Patients with Li Fraumeni syndrome are excluded from the study as M6620 (VX-970) is a DDR inhibitor
* Addition of bevacizumab to the treatment in this study is not allowed; if the treating physician feels that the addition of bevacizumab is in the best interest of the patient, the patient should be treated with an FDA approved regimen outside of the present study