Globular cluster systems in most large galaxies display bimodal color and metallicity distributions, which are frequently interpreted as indicating two distinct modes of cluster formation. The metal-rich (red) and metal-poor (blue) clusters have systematically different locations and kinematics in their host galaxies. However, the red and blue clusters have similar internal properties, such as their masses, sizes, and ages. It is therefore interesting to explore whether both metal-rich and metal-poor clusters could form by a common mechanism and still be consistent with the bimodal distribution. We show that if all globular clusters form only during mergers of massive, gas-rich protogalactic disks, their metallicity distribution could be statistically consistent with that of the Galactic globulars. We take the galaxy assembly history from cosmological dark-matter simulations and couple it with the observed scaling relations for the amount of cold gas available for star formation. In the best-fitting model, early mergers of smaller hosts create exclusively blue clusters, while subsequent mergers of progenitor galaxies with a range of masses create both red and blue clusters. Thus, bimodality arises naturally as the result of a small number of late, massive merger events. We calculate cluster mass loss, including the effects of two-body scattering and stellar evolution, and find that more blue than red clusters are disrupted by the present time because of their lower initial masses and older ages. The present-day mass function in the best-fitting model is consistent with the Galactic distribution. However, the spatial distribution of model clusters is much more extended than observed and is independent of the parameters of our model.