Exposure to Clostridioides difficile can result in asymptomatic carriage or infection with symptoms ranging from mild diarrhea to fulminant pseudomembranous colitis. A reliable diagnostic approach for C. difficile infection (CDI) remains controversial. Accurate diagnosis is paramount not only for patient management but also for epidemiology and disease research. Here, we characterized gut microbial compositions and a broad panel of innate and adaptive immunological markers in 243 well-characterized human subjects, who were divided into four phenotype groups: CDI, Asymptomatic Carriage, Non-CDI Diarrhea, and Control. We found that CDI is associated with alteration of many different aspects of the gut microbiota, including overall microbial diversity and microbial association networks. We demonstrated that incorporating both gut microbiome and host immune marker data into classification models can better distinguish CDI from other groups than can either type of data alone. Our classification models display robust diagnostic performance to differentiate CDI from Asymptomatic carriage (AUC~0.916), Non-CDI Diarrhea (AUC~0.917), or Non-CDI that combines all other three groups (AUC~0.929). Finally, we performed symbolic classification using selected features to derive simple mathematic formulas for highly accurate CDI diagnosis. Overall, this study provides evidence supporting important roles of gut microbiota and host immune markers in CDI diagnosis, which may also inform the design of future therapeutic strategies.