Infertility is a common complication of endometriosis; while IVF successfully treats endometriosis-associated infertility, pregnancy rates are diminished compared to other etiologies of infertility. The study's long- term objectives are to better identify and treat endometriosis related infertility. The investigators' central hypothesis is that in infertile woman with endometriosis undergoing in vitro fertilization-embryo transfer (IVF-ET), live birth rates will improve in those pretreated with GnRH antagonist compared to those not pretreated with GnRH antagonist. The use of gonadotropin releasing hormone (GnRH) agonist prior to IVF has been suggested to improve success, however studies have been small and rarely reported live birth rates. Further, use of this approach is limited by the long treatment time required. Recent approval of an oral GnRH antagonist for endometriosis provides a novel option for women with endometriosis who are undergoing IVF. This agent avoids parenteral administration and the prolonged delay in initiation of action as was seen with GnRH agonists. There have been no studies on the efficacy of GnRH antagonists for the treatment of endometriosis-related infertility. The investigators propose a clinical trial of oral GnRH antagonist pre-treatment for women with endometriosis who are undergoing IVF, with a primary outcome of live birth rate. Participants will include those who agree to be randomized and those who do not want to be randomized. Those who agree to be randomized will be randomly assigned to either the elagolix group or placebo group. Those who do not want to be randomized can choose either the active treatment elagolix and follow the same procedures as those agreeing to be randomized or continue their ongoing or planned IVF and follow standard of care (SOC) (SOC IVF) if they do not want to delay the IVF procedure.