In this paper we use Euclidean gravity methods to show that charged black holes which are sufficiently close to extremality must be able to decay. The argument proceeds by showing that Euclidean gravity would otherwise imply a violation of charge quantization. As this is the assumption which leads to the weak gravity conjecture, our argument gives a derivation of that conjecture. We use a small negative cosmological constant as an infrared regulator, but our argument applies to near-extremal black holes which are arbitrarily small compared to the $AdS$ curvature scale. We also give a universal formula for the density of black hole microstates which transform in each irreducible representation of any finite gauge group. Since each representation appears with nonzero fraction, this gives a new proof of the completeness hypothesis for finite gauge fields. Based on these observations we make two conjectures about many-body quantum physics: we propose a lower bound on the critical temperature for the instability of a semi-local quantum liquid, and we propose that our formula for the density of black hole microstates in each representation of a finite gauge group also applies at high energy to any quantum field theory with a finite group global symmetry.