Biofilm formation by the fungal pathogen Candida albicans is the basis for its ability to infect medical devices. The metabolic gene ERG251 has been identified as a target of biofilm transcriptional regulator Efg1, and here we report that ERG251 is required for biofilm formation but not conventional free-living planktonic growth. An erg251Δ/Δ mutation impairs biofilm formation in vitro and in an in vivo catheter infection model. In both in vitro and in vivo biofilm contexts, cell number is reduced and hyphal length is limited. To determine whether the mutant defect is in growth or some other aspect of biofilm development, we examined planktonic cell features in a biofilm-like environment, which was approximated with sealed unshaken cultures. Under those conditions, the erg251Δ/Δ mutation causes defects in growth and hyphal extension. Overexpression in the erg251Δ/Δ mutant of the paralog ERG25, which is normally expressed more weakly than ERG251, partially improves biofilm formation and biofilm hyphal content, as well as growth and hyphal extension in a biofilm-like environment. GC-MS analysis shows that the erg251Δ/Δ mutation causes a defect in ergosterol accumulation when cells are cultivated under biofilm-like conditions, but not under conventional planktonic conditions. Overexpression of ERG25 in the erg251Δ/Δ mutant causes some increase in ergosterol levels. Finally, the hypersensitivity of efg1Δ/Δ mutants to the ergosterol inhibitor fluconazole is reversed by ERG251 overexpression, arguing that reduced ERG251 expression contributes to this efg1Δ/Δ phenotype. Our results indicate that ERG251 is required for biofilm formation because its high expression levels are necessary for ergosterol synthesis in a biofilm-like environment.