The Very Large Telescope Lyman-Break Galaxy Redshift Survey – IV. Gas and galaxies at z ∼ 3 in observations and simulations