We investigate galaxy clustering and the correlations between galaxies and mass in the CDM cosmological model (inflationary cold dark matter with m ¼ 0:4, ¼ 0:6, h ¼ 0:65, n ¼ 0:95, and � 8 ¼ 0:8), using a large, smoothed particle hydrodynamics simulation (SPH; with 2 � 144 3 particles in a 50 h � 1 Mpc cube). Simulated galaxies can be unambiguously identified as clumps of stars and cold gas a few kpc to a few tens of kpc across, residing in extended halos of hot gas and dark matter; the space density of the resolved galaxy population at z ¼ 0 corresponds to that of observed galaxies with luminosity LkL� =4. We investigate the galaxy correlation function, the pairwise velocity dispersion and mean pairwise velocity, and the second and third moments of counts in cells; we also investigate the galaxy-mass correlation function and the average extended mass distributions around galaxies, both of which can be measured via galaxy-galaxy lensing. For the most part, the predicted biases between galaxies and dark matter lead to good agreement with current observations, including (1) a nearly constant comoving correlation length from z ¼ 3 to 0 for mass-selected galaxy samples of constant comoving space density; (2) an rms bias factor b� � 1a tz ¼ 0; (3) a scale-dependent bias on small scales that transforms the curved dark matter correlation function into a nearly power-law galaxy correlation function; (4) galaxy pairwise dispersion and hierarchical skewness ratio S3 in good agreement with observed values, lower than values for the dark matter by � 20%; (5) a ratio of galaxy-galaxy to galaxy-mass correlation functions consistent with recent measurements from the Red Cluster Sequence survey; and (6) a mean excess mass M ð260 h � 1 kpcÞ approximately proportional to galaxy baryon mass Mb, in agreement with estimates from the Sloan Digital Sky Survey (SDSS). All these clusterin gp roperties vary with galaxy baryon mass and, more strongly, with the age of a galaxy’s stellar population. The predicted dependences are in good qualitative agreement with the observed dependence of galaxy clustering and the galaxy-mass correlation function on galaxy type. The predicted ratio Mð260 h � 1 kpcÞ=Mb is lower than the SDSS estimates by a factor of � 1.5‐3 for galaxies with Mb k2 � 10 11 M� . A test with a higher resolution (smaller volume) simulation suggests that this discrepancy is largely a numerical artifact; if so, then the SDSS weak-lensing comparison leaves limited room for feedback or other astrophysical processes to reduce the stellar masses of luminous galaxies, at least given our adopted cosmological parameters. On the whole, our results show that the CDM model and the galaxy formation physics incorporated in the SPH simulation give a good account of observed galaxy clustering, but anticipated improvements in clustering and weak-lensing measurements will soon test this picture in much greater detail. Subject headings: cosmology: theory — galaxies: formation — large-scale structure of universe — methods: numerical