The role of the gravitational field as a source of entropy is discussed, first in connection with cosmology, then for black holes. A review is given of the need for an assumption of 'molecular' chaos or randomness at the initial cosmological singularity, in order to achieve consistency of statistical mechanics with the observed time asymmetry in the universe. It is argued that a simple randomness assumption cannot always be made, because several singularities may be casually connected. The situation is compared with that of quantum black and white holes confined in a closed box. The possibility of black-hole fluctuations is discussed, together with Hawking's conjecture that black and white holes are indistinguishable.