Observations from the Hopkins Ultraviolet Telescope and the Hubble Space Telescope have recently detected He II absorption along the lines of sight to two high-redshift quasars. We use cosmological simulations with gas dynamics to investigate He II absorption in the cold dark matter (CDM) theory of structure formation. We consider two Omega = 1 CDM models with different normalizations and one open universe (Omega(0) = 0.4) CDM model. The simulations incorporate the photoionizing UV background spectrum computed by Haardt & Madau, which is based on the output of observed quasars and reprocessing by the Ly alpha forest. The simulated gas distribution, combined with the Haardt & Madau spectral shape, accounts for the relative observed values of <(tau)over bar>(HI) and <(tau)over bar>(He II), the effective mean optical depths for H I and He II absorption. If the background intensity is as high as Haardt & Madau predict, then matching the absolute observed values of <(tau)over bar>(H I) and <(tau)over bar>(He II) requires a baryon abundance larger (by factors between 1.5 and 3 for the various CDM models) than our assumed value of Omega(b)h(2) = 0.0125. The simulations reproduce the evolution of <(tau)over bar>(He II) over the observed redshift range, 2.2 less than or similar to z less than or similar to 3.3, if the He II photoionization rate remains roughly constant. He II absorption in the CDM simulations is produced by a diffuse, fluctuating intergalactic medium, which also gives rise to the H I Ly alpha forest. Much of the He II opacity arises in underdense regions where the H I optical depth is very low. We compute statistical properties of the He II and H I absorption that can be used to test the CDM models and distinguish them from an alternative scenario in which the He II absorption is caused by discrete, compact clouds. The CDM scenario predicts that a substantial amount of baryonic material resides in underdense regions at high redshift. He II absorption is the only sensitive observational probe of such extremely diffuse, intergalactic gas, so it can provide a vital test of this fundamental prediction.