Vector-boson pair production is an important background for Higgs boson and new physics searches at the Large Hadron Collider LHC. We have calculated the loop-induced gluon-fusion process gg -> WW -> leptons, allowing for arbitrary invariant masses of the intermediate W bosons. This process contributes at O(alpha_s^2) relative to quark-antiquark annihilation, but its importance is enhanced by the large gluon flux at the LHC and by experimental cuts employed in Higgs boson searches. We find that gg -> WW provides only a moderate correction (ca. 5%) to the inclusive W-pair production cross section at the LHC. However, after taking into account realistic experimental cuts, the gluon-fusion process becomes significant and increases the theoretical WW background estimate for Higgs searches in the pp -> H -> WW -> leptons channel by approximately 30%.