Effective potential and phase transitions induced by curvature in gauge theories in curved spacetime