Quantum metrology makes use of coherent superpositions to detect weak signals. While in principle the sensitivity can be improved by increasing the density of sensing particles, in practice this improvement is severely hindered by interactions between them. Using a dense ensemble of interacting electronic spins in diamond, we demonstrate a novel approach to quantum metrology. It is based on a new method of robust quantum control, which allows us to simultaneously eliminate the undesired effects associated with spin-spin interactions, disorder and control imperfections, enabling a five-fold enhancement in coherence time compared to conventional control sequences. Combined with optimal initialization and readout protocols, this allows us to break the limit for AC magnetic field sensing imposed by interactions, opening a promising avenue for the development of solid-state ensemble magnetometers with unprecedented sensitivity.