Elemental gallium can exist in several phases under ambient pressure. The stable α phase has a superconducting transition temperature, Tc, of 0.9 K. By contrast, the Tc of the metastable β phase is around 6 K. To understand the significant improvement in Tc in the β phase, we first calculate the electronic structure, phonon dispersion, and the electron-phonon coupling of gallium in the α and β phases. Next, we solve the Eliashberg equations to obtain the superconducting gaps and the transition temperatures. Using these results, we relate the increased Tc in the β phase to structural differences between the phases that affect the electronic and phonon properties. The structure motif of the α phase is Ga2 dimers, which form strong covalent bonds leading to bonding and antibonding states that reduce the density of states at the Fermi level. The β -Ga structure consists of arrays of Ga chains that favor strong coupling between the lattice vibrations and the electronic states near the Fermi level. The increased density of states and strong coupling to the phonons for the β -Ga chains compared to the α Ga2 dimers enhance superconductivity in the β -Ga phase.