The National Gallery of Australia has won its three-year funding battle to replace the roof of its brutalist home.