We can probe this matter a little more in-depth. This introductory reference describes all the giant or Jovian planets, noting that only the two more massive ones, Jupiter and Saturn, are made primarily of hydrogen and helium. Uranus and Neptune, which did not have as much material to work with and did not become powerful enough to draw large proportions of hydrogen and helium, accreted materials that were originally ices (water, ammonia, methane, etc). That's where the "ice" in "ice giants comes from as GdD's answer states.
The introductory site is not a primary reference. This reference (free version in http://www.boulder.swri.edu/~hal/PDF/un-scat_nature.pdf) provides such a primary reference. Using models, it is predicted that a core of about 15 Earth masses was required for accretion of large amounts of gas, and the "gas giants" reached that critical core mass. The "ice giants" fell short and thus were left with more ice that phase-transformed (as did much of the gas in the gas giants).
One more relevant fact: the whole concept of "ice giants" is of recent vintage, born in 1990. Before then, less was known about the subtle differences between these planets and "gas giants" was used indiscriminately for all the Jovian planet's.