The Alfred Sharpe watercolour Among the Kauri, Castle Rock, Coromandel was painted in 1884, the year in which the Dunedin Public Art Gallery was founded.
"We've been looking for one of these for years," collections manager Robyn Notman said.
"He is a watercolour artist who is greatly admired. It's a very engaging work and it complements the gallery's collection perfectly."
The work was in unusually good condition for a 19th century watercolour, because it had always been kept covered.
"It's in beautiful condition. The colours are still strong and it's very detailed for a watercolour."
The work was on a wish list supplied by outgoing gallery director Elizabeth Caldwell and was bought for "in excess of $100,000" by the gallery and the Otago Art Society.
"We're very lucky to get it. It was a gap in the collection," Ms Notman said.
The painting will be the centrepiece of a New Zealand landscape exhibition at the gallery early next year.