Galactose is a common monosaccharide that can be utilized by all living organisms via the activities of three main enzymes that make up the Leloir pathway: GalK, GalT, and GalE. In Bacillus subtilis, the absence of GalE causes sensitivity to exogenous galactose, leading to rapid cell lysis. This effect can be attributed to the accumulation of toxic galactose metabolites, since the galE mutant is blocked in the final step of galactose catabolism. In a screen for suppressor mutants restoring viability to a galE null mutant in the presence of galactose, we identified mutations in sinR, which is the major biofilm repressor gene. These mutations caused an increase in the production of the exopolysaccharide (EPS) component of the biofilm matrix. We propose that UDP-galactose is the toxic galactose metabolite and that it is used in the synthesis of EPS. Thus, EPS production can function as a shunt mechanism for this toxic molecule. Additionally, we demonstrated that galactose metabolism genes play an essential role in B. subtilis biofilm formation and that the expressions of both the gal and eps genes are interrelated. Finally, we propose that B. subtilis and other members of the Bacillus genus may have evolved to utilize naturally occurring polymers of galactose, such as galactan, as carbon sources.