Rembrandt's Self-portrait at The Age of 63, one of a series of self-portraits had paint squirted on it on Tuesday. Security staff at the gallery, in London's Trafalgar Square, overpowered the man and prevented further harm to the painting, considered one of the artist's most important pieces.
It was immediately taken to the gallery's restorers who were able to remove the paint without damaging the picture.
A spokeswoman for the gallery said: "Thanks to the prompt action of staff, the work did not sustain any permanent damage."
The National Gallery has about five million visitors every year. Apart from a knee-high rope in front of the pictures, there are no physical barriers to protect its exhibits, although there are gallery staff in every room.
Tuesday's attack was the most serious at the National since a Leonardo da Vinci drawing was badly damaged with a sawn-off shotgun in 1987. Damage estimated at pounds 400,000 was inflicted on the 450-year-old cartoon of Virgin and Child with Saint Anne and Saint John the Baptist. That attack was carried out as a protest against poverty and social conditions in Britain by a 37-year-old former soldier.
In March 1914, a suffragette damaged a painting of a reclining nude by the artist Velasquez by whacking it with an umbrella.
Last year, a portrait of the Moors murderer, Myra Hindley, was damaged in two attacks at the Royal Academy in London.
Protesters hurled paint and eggs at the painting on the opening day of a new exhibition, Sensation, featuring the work of young British artists.
Vincent Bethell, 26, an unemployed man from Coventry, was charged yesterday with criminal damage in connection with the incident involving the Rembrandt.
There has been no explanation of why the assault was carried out.