The future of the World Heritage Site lay in jeopardy when a 200-year-old retaining wall began to show signs of decay.
But the major tourist attraction will receive a Rural Priorities grant of 655,000 from the Scotland Rural Development Programme. The 220 jobs supported by the New Lanark Trust will be safeguarded and a further 20 created.
The New Lanark Trust is one of 594 projects expected to share around 70 million in funding through the latest round of awards to be announced by rural affairs secretary Richard Lochhead on Tuesday.
Funding from this round alone is expected to lead to the creation of at least 600 jobs and safeguard hundreds more. The grants provide both environmental and business support with some paid over the course of several years.
Lochhead said: "Rural Scotland is the backbone to economic development in this country. As well as supporting almost 478,000 jobs, our natural environment and cultural heritage is a draw to more than 14.5 million visitors each year."
Several other projects aimed at boosting Scotland's tourism and heritage potential have been given funding. They include the creation of eco-friendly luxury seaside villas along the scenic Ballantrae Harbour in Ayrshire, the conversion of a redundant farm building near Lockerbie into holiday accommodation, the creation of 11km of cycle trails in the grounds of Lewis Castle, Stornoway, and a habitat restoration scheme, including the creation of a 200 hectares of native woodland near the famous Devil's Beeftub, Moffat.