An equation of state (EOS) applicable to both the uniform and non-uniform associating fluids was established by using the density-gradient expansion, in which the influence parameter κ is formulated as a function of temperature. The molecular parameters were regressed by fitting to the experimental data of vapor pressures and liquid densities. Within the framework of density gradient theory (DGT), the nucleation rates for water, heavy water, methanol, ethanol, 1-propanol, 1-butanol, 1-pentanol and 1-hexanol were calculated. The results were satisfactory compared with the experimental data. Our study shows that DGT preserves all the advantages of density functional theory (DFT) in capturing the structure and properties of nucleus but gives much more accurate nucleation rates by adjusting the influence parameter.