NGC 321 was a star cluster. The cluster contained the star Eminiar and its system, which included the planets Eminiar VII and Vendikar. This cluster was located in the Alpha Quadrant. (Star Trek VI: The Undiscovered Country, production art)
In 2267, the Federation dispatched Ambassador Robert Fox aboard the USS Enterprise to negotiate a treaty port there. Federation authorities were concerned over the large number of deaths in the quadrant since 2247, and sought the treaty port to lessen the hazards. Fox ultimately remained on Eminiar to help negotiate a peace treaty that ended the Eminians' five-century war with Vendikar. (TOS: "A Taste of Armageddon")
"The Explored Galaxy" was a map of charted space in the Alpha Quadrant. NGC 321, represented here by Eminiar, was located between the Tholian Assembly and Romulus. Both locations were identified in DS9: "The Search, Part II", "Call to Arms" as being located in this quadrant. The chart was also seen in several Star Trek: The Next Generation and Star Trek: Deep Space Nine episodes set in the 24th century, from the year 2364 to 2370. These were TNG: "Conspiracy", "The Measure Of A Man", "The Emissary", "The Mind's Eye", "The Game", and DS9: "In the Hands of the Prophets", "Cardassians".
was a distant galaxy
in the real world, but in Star Trek the designation was used to indicate a star cluster within the Milky Way Galaxy.