The funding was announced yesterday by Prime Minister Jacinda Ardern at the Ranfurly hospital and rest-home during Ms Ardern's tour of rural Otago.
The money had been pledged by former Labour leader Andrew Little before the election last year, but hospital leaders had not known if the funding would come through.
They yesterday thanked the Labour-led Government for keeping its promise, and said it was "perfect timing" just days from the beginning of the project.
Contractor Stewart Construction is expected to begin work on Monday, and the project is due for completion within 13 months.
Ms Ardern said investing in basic services such as health was a priority for the Government, and good-quality health services should be just as available in rural areas as they were in large cities.
But she said it was the hard work of Maniototo locals that had made the hospital rebuild possible.
"Congratulations to you for the work you have done. The amount of fundraising you have done is extraordinary."
Maniototo Health Services Ltd (MHSL) has raised $6.3million for the project so far: $2.5 million from hospital reserves; $2 million from the Central Otago District Council, to be either paid back by Maniototo ratepayers or funded through Maniototo land sales; and $1.8 million from Maniototo fundraising and grants, including a $500,000 Otago Community Trust grant and $97,000 raised at a "dine and dance" held in the Maniototo community.
The rebuild is expected to cost about $7 million.
MHSL chairman Stuart Paterson and manager Geoff Foster said they were thrilled with the Government support, and hospital and rest-home residents had enjoyed meeting the Prime Minister.
Nurse manager Mary Helm said many residents had not believed staff when they said Ms Ardern was coming to visit, but the excitement had then reached "fever pitch".
Many were star-struck by Ms Ardern as she met hospital patients and rest-home residents and posed for photos.
"She was lovely," Mrs Helm said. "It was a huge day for the Maniototo."
Earlier in the day Ms Ardern visited Oamaru, where she stopped in at Waitaki Boys' High School to open the school's redeveloped science block.
At a short ceremony at the school's Hall of Memories, Waitaki Boys' High School rector Darryl Paterson said a generation of students had used a "substandard" facility.
Ms Ardern was asked to speak on the topic of resilience, because the school had overcome challenges, he said, "none more so than recent years when the school's reputation has been badly damaged".
Ms Ardern spoke of the ups and downs - the successes and the failures - she experienced as a 16-year-old pupil at Morrinsville College, in the rural Waikato, when she entered the science fair.
Her team won the Waikato science fair and ultimately won runner-up at the New Zealand national finals, but not without encountering failure along the way.
"And I, still to this day, I don't remember the success, I remember the times that I failed," she said.
"And that actually, failure was what taught me how to keep the process going, to keep going and never give up."