In the UK, the primary legislation is the Firearms Act 1968 (and subsequent amendments). Other legislation may apply to a museum depending on the type of firearms in its possession.
Firearms law is complex. The Home Office publishes guidance regarding the legislation (see Sources and references). Museums are recommended to obtain advice from a Police Firearms Liaison Officer about security and authorisation to possess firearms. Note that they will not usually offer advice about whether a museum object is classified as a firearm (see What must a museum do?)