The HBB gene encodes the β-globin component of hemoglobin. Mutations in this gene affect the shape and functionality of hemoglobin.