The gene responsible for sexual reproduction in algae and fungi is the mating-type gene. This gene has two alleles, one for each mating type. When two haploid cells, each with a different mating type, come together, they can mate and produce a diploid cell that can then undergo meiosis and produce haploid progeny.