Using a cold atomic gas exposed to laser pulses - a realization of the chaotic quasiperiodic kicked rotor with three incommensurate frequencies - we study experimentally and theoretically the Anderson metal-insulator transition in three dimensions. Sensitive measurements of the atomic wavefunction and the use of finite-size scaling techniques make it possible to unambiguously demonstrate the existence of a quantum phase transition and to measure its critical exponents. Both accurate numerical simulations and experimental measurements show the universality of the critical exponent. Using the self-consistent theory of localisation, we derive the analytic form of the wavefunction at the critical point, which is found in excellent agreement with the experimental observation.