Glioblastoma (GBM) is a highly malignant brain tumor with a dismal prognosis. Gene expression profiling of GBM has revealed clinically relevant tumor subtypes, and this provides exciting opportunities to better understand disease pathogenesis. Results from an increasing number of studies demonstrate a role for the immune response in cancer progression, yet it is unclear how the immune response differs across tumor subtypes and how it affects outcome. Utilizing gene expression data from The Cancer Genome Atlas Project and the Gene Expression Omnibus database, we demonstrate an enrichment of immune response-related gene expression in the mesenchymal subtype of adult GBM (n = 173) and pediatric high-grade gliomas (n = 53). In an independent cohort of pediatric astrocytomas (n = 24) from UCSF, we stratified tumors into subtypes and confirmed these findings. Using novel immune cell-specific gene signatures we demonstrate selective enrichment of microglia/macrophage-related genes in adult and pediatric GBM tumors of the mesenchymal subtype. Furthermore, immunostaining of adult GBM tumors showed significantly higher cell numbers of microglia/macrophages in mesenchymal versus non-mesenchymal tumors (p = 0.04). Interestingly, adult GBM tumors with the shortest survival had significant enrichment of microglia/macrophage-related genes but this was not true for pediatric GBMs. Consistent with an association with poor outcome, immune response-related genes were highly represented in an adult poor prognosis gene signature, with the expression of genes related to macrophage recruitment and activation being most strongly associated with survival (p<0.05) using CoxBoost multivariate modeling. Using a microglia/macrophage high gene signature derived from quantification of tumor-infiltrating cells in adult GBM, we identified enrichment of genes characteristic of CD4 T cells, granulocytes, and microglia/macrophages (n = 573). These studies support a role for the immune response, particularly the microglia/macrophage response, in the biology of an important subset of GBM. Identification of this subset may be important for future therapeutic stratification.