Tensor calculus was developed about 20 years before the general relativity by Ricci and Levi-Civita, starting around 1890, under the name of absolute differential calculus. It was motivated by Riemann's work on manifolds with a metric, and summarized in their comprehensive 1900 book. Einstein learned about it from a geometer friend Grossman around 1912, and saw it as a good vehicle to express his new ideas for geometrizing mechanics. It took him two years of correspondence with Levi-Civita to master the techniques. He even contributed some simplifications like the use of upper and lower indices, and the summation convention. However, coordinate tensor calculus was in principle at odds with Einstein's ideas about relativity and general covariance since it relied on local coordinates.
The invariant turn is associated with the work of Elie Cartan in 1920-s on integrability of so-called Pfaffian systems, where he developed differential forms as an alternative coordinate free notation. In 1950 Kozsul used it to eliminate non-tensorial objects like Christoffell symbols from the theory of covariant differentiation, and swift adoption of differential forms by many mathematicians followed in 1950-s. It became a standard due to the Bourbaki project, the expression "debauchery of indices" is theirs, and it tells us how they felt about the coordinate calculus.
Part of it is that coordinate free notation is more "natural" because there is no global choice of coordinates on manifolds. Part of it is algebraic elegance that allows for cleaner and more conceptual proofs in geometry. Another part is that it fit very well with the framework of algebraic topology, intensively pursued in 1950-s, particularly with deRham cohomology and the theory of characteristic classes. And part of it, especially later, is the strong influence of Bourbaki on standardization of mathematics in general.
Physicists, who are more often interested in computations than in proofs, were never fully sold on the invariant notation, and continue to use indices alongside it. However, after the publication of Yang-Mills paper in 1954, and the realization that gauge fields are intrinsically connection forms already studied by mathematicians, many physicists invested into learning both languages to understand their counterparts. Also, the ideas of gauge invariance and general covariance are more manifestly expressed by invariant concepts and techniques.