Climate activists poured black liquid over a glass screen protecting Gustav Klimt's masterpiece "Death and Life" in Vienna on Tuesday, in the latest protest at inaction over global heating.
The work by the Austrian painter was undamaged, Vienna's Leopold Museum said.
Tuesday's stunt follows a string of actions by activists to highlight the climate emergency.
They have glued themselves to the frame of a Goya in Madrid, thrown soup at screens covering Vincent van Goghs in London and Rome, and mashed potatoes on the glass over a Claude Monet.
"We were attacked shortly after 11:00 am," Leopold Museum spokesman Klaus Pokorny said.
"Last generation Austria", a group campaigning for the Vienna government to stop new investments in fossil fuels, claimed responsibility on Twitter for targeting the Klimt painting.
It shared images on social media of two men pouring a black, oily liquid on the glass protecting the work before being seized by a museum employee.
One of the activists then glued himself to the picture frame.
"Stop fossil destruction. We're racing towards climate hell," one of the protesters shouted.
Museum director Hans-Peter Wipplinger said neither the painting nor the frame had been damaged.
The two protesters were not arrested, but are subject to a complaint for serious damage to property and disturbance of public order, a Vienna police spokeswoman told AFP.
Admission to the Leopold Museum was free on Tuesday as part of a day sponsored by Austrian oil and gas group OMV.
"The concerns of climate activists... are valid but attacking artworks is definitely the wrong way to go," Wipplinger said.
Austrian State Secretary for Art and Culture Andrea Mayer said it was wrong to risk causing "irreparable damage to works of art".
"Art and culture are allies in the fight against the climate catastrophe, not opponents," she said.
Dozens of the world's top museums issued a joint statement last week saying environmental activists who targeted paintings "severely underestimate" the damage that could be caused.
The statement was spearheaded by the Prado in Madrid, and signed by the directors of more than 90 world-renowned museums including the Guggenheim in New York, the Louvre in Paris and the Uffizi in Florence.