An observatory is a facility used to observe and analyze spatial phenomenon. They typically have complex telescopes within them, and can be located on the surface of a planet or in space.
In 2373, the USS Voyager was thrown back in time to late 20th century Earth where it was picked up by a observatory located in the city of Los Angeles, on the planet's North American continent. In response, the observatory's operator, Rain Robinson, sent a standard greeting message to the starship. (VOY: "Future's End")
In 2376, the starship Voyager was again spotted by an observatory while trapped in orbit of a planet experiencing the effects of differential space-time. (VOY: "Blink of an Eye")
The Amargosa observatory was a Federation outpost orbiting the Amargosa star during the late 24th century. (Star Trek Generations)