(covers information from several alternate timelines)
The armory, arsenal, weapons room, or weapons bay of a starship or other facility was a secured location in which weapons and other offensive or defensive devices were stored to prevent unauthorized personnel from gaining access. A starship usually had only one armory. On some vessels, armories held photon torpedoes and other ship-based weapons.
In Starfleet, armories existed from as early as the mid-22nd century, when they were typically manned by an armory officer. (Star Trek: Enterprise) Starfleet ship designs that incorporated an armory included the NX-class, Constitution-class, Galaxy-class, Intrepid-class, and Sovereign-class. (Star Trek: Enterprise; TOS: "Space Seed", "Day of the Dove"; TNG: "11001001"; VOY: "Displaced", "The Raven", "The Killing Game"; Star Trek: First Contact)
Aboard the NX-class starship Enterprise NX-01, the armory was upgraded with steps between the deck and a new platform for the armory station. A third launch tube, extending under the platform, was added in 2153. (ENT: "The Expanse")
In the 23rd century, Constitution-class starships had an entire weapons department on one of the vessel's decks. This department could solely maintain battle stations, while all other decks were not operating under alert conditions.
In 2267, slightly over an hour after the USS Enterprise rendezvoused with the adrift SS Botany Bay, Captain Kirk contacted the weapons department and ordered them to remain at battle stations, although the Enterprise's other decks were to change to alert standby.
Upon the Enterprise's senior officers forcibly retaking command from Augments who had boarded the ship from the Botany Bay and were led by Khan Noonien Singh, the armory was one of the first places with which Khan lost communication from the Enterprise's briefing room. Shortly afterwards, Spock arranged to rendezvous with Montgomery Scott in the armory, as Spock unleashed anesthesia gas on almost every deck. Spock gave priority to securing the armory. (TOS: "Space Seed")
While the Beta XII-A entity was attempting to pit the Enterprise's crew against the crew of a Klingon battle cruiser under the command of Kang in 2268, Scott checked the armory in compliance with instructions from Captain Kirk, shortly after the Klingons broke free from detainment aboard the Enterprise. Much to Scott's surprise, he found that the armory's collection of phasers were among several weapons that had somehow been transformed into antique swords, one of which was a claymore. Unbeknown to Scott at that time, this was due to the entity's interference. Upon learning that there were no phasers in the armory, Kirk instructed Scott to talk to Ordnance about manufacturing phaser replacements. (TOS: "Day of the Dove")
In the alternate reality, there was at least one armory located on board the Constitution-class USS Enterprise. It was accessible from a standard corridor. This area provided access to numerous phasers and phaser rifles of varying configurations, attached to the bulkhead for access by security personnel. (Star Trek Beyond)
Galaxy-class starships had at least one weapons room, which was located on Deck 36 and required voice authorization to enter. USS Enterprise-D Captain Jean-Luc Picard and First Officer William T. Riker accessed such a weapons room in 2364, to arm themselves after learning the Enterprise-D had been commandeered by Bynar computer technicians. Picard alone gave voice authentication to access the weapons room, from which he and Riker took one phaser each. (TNG: "11001001")
The Intrepid-class possessed multiple armories, one of which was on Deck 6. (VOY: "The Killing Game, Part II", "The Raven") Explosive charges were typically available from these armories. (VOY: "The Killing Game, Part II")
In 2373, when Commander Chakotay became wary that Nyrian newcomers who had arrived on board the USS Voyager via mysterious exchanges of personnel and who easily outnumbered the vessel's crew members, the armories were among a few sensitive parts of the ship that Chakotay ordered Ensign Lang – who was acting as the ship's security chief, in lieu of Lieutenant Tuvok – to place security force fields around. (VOY: "Displaced")
In 2374, Seven of Nine visited the armory on Deck 6 of Voyager after she began reverting back to her Borg mindset because several of her nanoprobes were reactivated. This armory was one of the last places she went to before forcing her way off Voyager, taking a phaser rifle from the armory. (VOY: "The Raven")
During a Hirogen incursion of Voyager later the same year, the Hirogen invaders took control of the craft's armories and used most of Voyager's crew essentially as pawns in a range of holoprograms that the Hirogen operated on board the ship, deactivating the holodecks' safety protocols. While Captain Janeway planned to use charges in order to disable neural interfaces that duped the crew members into believing the simulations were real, The Doctor notified her that the armories had been taken over, though Janeway opted to instead use holographic explosives from the programs themselves. (VOY: "The Killing Game, Part II")
The Sovereign-class had at least one area where weapons were securely stored. After the Sovereign-class USS Enterprise-E traveled back in time from 2373 to 2063, a security team prepared to counter a Borg invasion of the ship in such an area, taking phaser rifles from wall-mounted racks and being briefed by Captain Picard. (Star Trek: First Contact)
Weapon areas on Klingon ships
Some Klingon Birds-of-Prey had an area reserved for weapons, such as a weapons room on a deck below the bridge. (ENT: "The Augments"; DS9: "Return to Grace") In 2154, the Augment Lokesh spent at least a day and a half in the weapons bay of an Augment-commandeered Klingon Bird-of-Prey, modifying a torpedo so it could be used to pollute the Klingon Qu'Vat Colony with viruses stolen from Cold Station 12. In response to Persis implying to Malik that Lokesh may have discreetly allowed Arik Soong to leave the Bird-of-Prey – an act Persis herself had carried out – Malik cited Lokesh's presence in the weapons bay as an alibi for him. (ENT: "The Augments")
Puzzled by an interval in firing at the Cardassian freighter Groumall in 2372, K'Temang – the captain of another particular Bird-of-Prey – furiously ordered one of his Klingon subordinates on the bridge to get down to the weapons room and determine why the Bird-of-Prey's disruptors were taking so long to continue firing. (DS9: "Return to Grace")
Vor'cha-class Klingon attack cruisers also possessed armories. In 2369, after being taken over by Saltah'na energy spheres, Captain Tel-Peh of the IKS Toh'Kaht seized that ship's armory, which first officer Hon-Tihl's mutinous forces were unable to take control of. Hon-Tihl later reported this incident in his mission logs, including mention of the armory in an entry that went on to be analyzed by Jadzia Dax aboard space station Deep Space 9 later that year. (DS9: "Dramatis Personae")
The Pakled transport Mondor had a weapons bay. While kidnapped by the craft's Pakled crew in 2365, Geordi La Forge visited this area, where he was forced to increase antimatter charges stored within to create highly powerful photon torpedoes that he then secretly disabled. (TNG: "Samaritan Snare")
A ground-based armory was included in the Albino's compound on Secarus IV. In 2370, Jadzia Dax assisted a trio of Klingons – specifically comprised of Kor, Kang, and Koloth – to plot an attack at the compound. Dax intended to create a diversion at the armory by sabotaging the weapons facility, causing a massive explosion inside the building. Though she succeeded in this goal (which influenced the Albino's head guard to temporarily divert patrols to that section of the compound), the Albino was wise to Dax's plan, ignoring the detonation. (DS9: "Blood Oath")
The originally-Cardassian layout of DS9 additionally incorporated an armory. In 2374, amid a joint Dominion/Cardassian takeover of the station, Odo arranged to have his Bajoran Militia officers report there within an hour after he managed to persuade Weyoun to allow them to carry weapons. (DS9: "A Time to Stand")
- TOS: "Day of the Dove"
- TNG: "Samaritan Snare"
- DS9: "Blood Oath"
- Star Trek film: Star Trek: First Contact
- "Fight or Flight"
- "Silent Enemy"
- "Sleeping Dogs"
- "Vox Sola"
- "Fallen Hero"
- "The Crossing"
- "The Expanse"
- "The Xindi"
- "The Shipment"
- "Chosen Realm"
- "Proving Ground"
- "Doctor's Orders"
- "The Council"
- "Babel One"
- Star Trek film: Star Trek Beyond
The term "weapons room" is from the episodes TNG: "11001001" and DS9: "Return to Grace". A similar area is called a "weapons bay" in ENT: "The Augments", in addition to the area commonly described as such in the script for "Samaritan Snare".
As director of Star Trek: First Contact, Jonathan Frakes contributed to the look of the Sovereign-class armory. He later recalled, "Early on I suggested some ideas for the armory set before it was even built, and [Production Designer] Herman [Zimmerman] was able to incorporate them." (Star Trek Monthly issue 19, p. 13) The same armory was actually a redress of the set for the Intrepid-class USS Voyager's cargo bay from Star Trek: Voyager. (Star Trek: First Contact text commentary, Star Trek: First Contact DVD)
The design of the NX-class armory was influenced by a tour of a fast-attack submarine that Herman Zimmerman took, prior to the launch of Star Trek: Enterprise. In fact, illustrator Doug Drexler once characterized the armory as a mixture of the strong impression this tour left on Zimmerman combined with "the best of Trek," while also being "a departure for TV Trek."
In the script for "Fight or Flight", the armory set is described thus; "Racks of sleek torpedoes line the walls and run down of this high-tech tactical nerve center." The armory was also scripted to include "a work station surrounded by monitors and weapon lockers," the room also featuring "a nearby console" and a companel.
Even though the set for the NX-class Enterprise's armory was first represented in the second episode of Star Trek: Enterprise – namely, "Fight or Flight" – the set was built for the pilot episode "Broken Bow", because the producers knew it would be needed later in the series. ("Broken Bow" text commentary, ENT Season 1 DVD) The set was built on Paramount Stage 18. (Star Trek Monthly issue 84, p. 29; ) Its central "control" area contained work by Michael Okuda.
For "Broken Bow", the NX-class armory set was redressed as both Starfleet Medical as well as the observation deck of the Orbital Drydock Facility. ("Broken Bow" text commentary, ENT Season 1 DVD) The set was also redressed as Enterprise's cargo bay for later installments. ("Vox Sola" text commentary, ENT Season 1 DVD)
The armory set was considered, by some reporters, as being possibly the most TOS-like of the NX-class standing sets. (Star Trek Monthly issue 84, p. 6) For instance, in the August 11th issue of the Canadian TV Guide, Senior Writer Brian Hartigan described the armory set as the "most Original Star Trek-ish."  When Abbie Bernstein was given a tour of the armory set, she found that one wall had been replaced by a wooden panel, because that portion of the set had been temporarily struck. (Star Trek Monthly issue 84, p. 29) A full-size mock-up of the set was included in the exhibition Star Trek: The Adventure.
At one point in the first draft script of the episode "Fortunate Son", Ensign Travis Mayweather offered Matthew Ryan a game of "Ship Toss" in a corridor aboard Enterprise NX-01, but Ryan was too frustrated to play, having just had an argument with Captain Archer. In the final scene of the script, however, Mayweather began setting up a game of Ship Toss with Reed and Tucker, in Enterprise's armory.