Biofilm formation has evolved as an adaptive strategy for bacteria to cope with harsh environmental conditions. Currently, little is known about the molecular mechanisms of biofilm formation in bifidobacteria. A time series transcriptome sequencing analysis of both biofilm and planktonic cells of Bifidobacterium longum FGSZY16M3 was performed to identify candidate genes involved in biofilm formation. Protein–protein interaction network analysis of 1296 differentially expressed genes during biofilm formation yielded 15 clusters of highly interconnected nodes, indicating that genes related to the SOS response (dnaK, groS, guaB, ruvA, recA, radA, recN, recF, pstA, and sufD) associated with the early stage of biofilm formation. Genes involved in extracellular polymeric substances were upregulated (epsH, epsK, efp, frr, pheT, rfbA, rfbJ, rfbP, rpmF, secY and yidC) in the stage of biofilm maturation. To further investigate the genes related to biofilm formation, weighted gene co-expression network analysis (WGCNA) was performed with 2032 transcript genes, leading to the identification of nine WGCNA modules and 133 genes associated with response to stress, regulation of gene expression, quorum sensing, and two-component system. These results indicate that biofilm formation in B. longum is a multifactorial process, involving stress response, structural development, and regulatory processes.