We present a detailed study of the gain length in an active medium obtained by doping of DNA strands with 4-(dicyanomethylene)-2-methyl-6-(4-dimethylaminostyryl)-4H-pyran dye molecules. The superior thermal stability of the composite and its low quenching permit one to obtain an optical gain coefficient larger than 300 cm(-1). We also demonstrate that such an active material is feasible for the infiltration into photonic nanostructures, allowing one to obtain fluorescent photonic crystals and promising lasing properties.