Agar, as a seaweed polysaccharide mainly extracted from Gracilariopsis lemaneiformis, has been commercially applied in multiple fields. To investigate factors indicating the agar accumulation in G. lemaneiformis, the agar content, soluble polysaccharides content, and expression level of 11 genes involved in the agar biosynthesis were analysed under 4 treatments, namely salinity, temperature, and nitrogen and phosphorus concentrations. The salinity exerted the greatest impact on the agar content. Both high (40‱) and low (10‱, 20‱) salinity promoted agar accumulation in G. lemaneiformis by 4.06%, 2.59%, and 3.00%, respectively. The content of agar as a colloidal polysaccharide was more stable than the soluble polysaccharide content under the treatments. No significant correlation was noted between the two polysaccharides, and between the change in the agar content and the relative growth rate of the algae. The expression of all 11 genes was affected by the 4 treatments. Furthermore, in the cultivar 981 with high agar content (21.30 ± 0.95%) compared to that (16.23 ± 1.59%) of the wild diploid, the transcriptional level of 9 genes related to agar biosynthesis was upregulated. Comprehensive analysis of the correlation between agar accumulation and transcriptional level of genes related to agar biosynthesis in different cultivation conditions and different species of G. lemaneiformis, the change in the relative expression level of glucose-6-phosphate isomerase II (gpiII), mannose-6-phosphate isomerase (mpi), mannose-1-phosphate guanylyltransferase (mpg), and galactosyltransferase II (gatII) genes was highly correlated with the relative agar accumulation. This study lays a basis for selecting high-yield agar strains, as well as for targeted breeding, by using gene editing tools in the future.