We discuss the evolution of gravitational systems under merging interactions between their components. Specifically, we consider galaxies in groups or in the field, and subclusters in forming clusters. The mass distribution evolving under aggregations is described with a kinetic equation, for which numerical and analytical solutions are presented and compared. The results agree quantitatively and show, after a short transient, two regimes: self-similar evolution; or a fast, critical phenomenon occurring over a few crossing times in finite systems with relatively low velocity dispersions. The latter bears the marks of a gravitational phase transition. We compare these findings with observations of groups and clusters of galaxies, and conclude that such gravitational phase transitions are indeed effective or even dominant in two typical environments: in groups, leading to the formation of a giant elliptical or a cD-like galaxy, and in forming clusters, causing fast erasure of substructures. In the "open" field we find that aggregations play only a complementary role relative to direct collapses from initial density perturbations. An intermediate situation may prevail in large-scale structures with weak contrast and slow expansion, like the sheets and filaments which actually modulate the field.