Wormholes, emergent gauge fields, and the weak gravity conjecture