Objective. Tumor microenvironment (TME) research can provide a crucial direction for the innovation and continuous improvement of novel biologic therapies for cancer. This study examined the relationship between the TME, expression profiles of the tumor-infiltrating immune cell, and prognostic gene expression in ovarian cancer (OC). Materials and Methods. Screening of CD3E, CD3G, CD2, CD3D, CCL19, and IL2RG was performed using the bioinformatics methods. Results. All six genes were found to participate in immune-related molecular mechanisms and could regulate the expression of tumor-infiltrating cells. A Kaplan–Meier survival analysis results demonstrated a strong association between overall survival and all gene expressions in patients with OC. CIBERSORT analysis results showed that the expression level of all genes was positively correlated with γδ T cell proportions. Conclusion. Therefore, in the OC microenvironment, CD3E, CD3G, CD2, CD3D, CCL19, and IL2RG can be potential immunotherapy targets and prognostic markers.