We study spin relaxation in a two-electron quantum dot in the vicinity of the singlet-triplet crossing. The spin relaxation occurs due to a combined effect of the spin-orbit, Zeeman, and electron-phonon interactions. The singlet-triplet relaxation rates exhibit strong variations as a function of the singlet-triplet splitting. We show that the Coulomb interaction between the electrons has two competing effects on the singlet-triplet spin relaxation. One effect is to enhance the relative strength of spin-orbit coupling in the quantum dot, resulting in larger spin-orbit splittings and thus in a stronger coupling of spin to charge. The other effect is to make the charge density profiles of the singlet and triplet look similar to each other, thus diminishing the ability of charge environments to discriminate between singlet and triplet states. We thus find essentially different channels of singlet-triplet relaxation for the case of strong and weak Coulomb interaction. Finally, for the linear in momentum Dresselhaus and Rashba spin-orbit interactions, we calculate the singlet-triplet relaxation rates to leading order in the spin-orbit interaction, and find that they are proportional to the second power of the Zeeman energy, in agreement with recent experiments on triplet-to-singlet relaxation in quantum dots.