Dulwich Picture Gallery in south-east London has been awarded the grant as part of its attempt to create an endowment fund of pounds 10.5m to ensure an annual income of pounds 800,000. For years it has made a financial loss because of rising costs and funding cuts.
In addition to the National Heritage Memorial Fund grant it has also raised pounds 2.6m from Alleyn's College of God's Gift, which was previously responsible for the gallery, and further grant pledges worth pounds 2m.
The Dulwich gallery contains one of the most important collections of 17th- and 18th-century paintings in the country, housed in a building designed by Sir John Soane.
The National Memorial Heritage Fund, which also distributes lottery money from its Heritage Lottery Fund, said yesterday that the importance of the gallery to Britain's heritage was "undoubted".
It said in a statement: "Trustees recognised that Dulwich is a unique case of an independent museum, whose constitution has been changed to put the gallery on a secure footing for the future, with a collection and a building which are both of heritage importance and do not receive adequate public funding."
It added that the grant to Dulwich did not come from the Heritage Lottery Fund because such grants are restricted to capital funding.
The London gallery attracted almost 50,000 visitors in the past 12 months, up from 34,507 the previous financial year. It also mounted a successful exhibition of paintings by Lucian Freud.