The gut microbiota composition of elderly hospitalized patients with Clostridium difficile infection (CDI) exposed to previous antibiotic treatment is still poorly investigated. The aim of this study was to compare the microbiota composition by means of 16S rRNA microbial profiling among three groups of hospitalized elderly patients (age ≥ 65) under standard diet including 25 CDI-positive (CDI group), 29 CDI-negative exposed to antibiotic treatment (AB+ group) and 30 CDI-negative subjects not on antibiotic treatment (ABâ group). The functional properties of the gut microbiomes of CDI-positive vs CDI-negative subjects were also assessed by shotgun metagenomics. A significantly lower microbial diversity was detected in CDI samples, whose microbiomes clustered separately from CDI-negative specimens. CDI was associated with a significant under-representation of gut commensals with putative protective functionalities, including Bacteroides, Alistipes, Lachnospira and Barnesiella, and over-representation of opportunistic pathogens. These findings were confirmed by functional shotgun metagenomics analyses, including an in-depth profiling of the Peptostreptococcaceae family. In CDI-negative patients, antibiotic treatment was associated with significant depletion of few commensals like Alistipes, but not with a reduction in species richness. A better understanding of the correlations between CDI and the microbiota in high-risk elderly subjects may contribute to identify therapeutic targets for CDI.