A garden is an area set aside for cultivation, display, and other enjoyment of plants and other elements of nature. In addition to outdoor gardens on the surface of a planet, areas of starships, space stations, and other installations could have areas set aside for gardening purposes.
A person who maintained a garden was called a gardener.
While replication technology rendered traditional methods of food gathering and cultivation largely obsolete gardening was still practised to supplement replicated food, along with providing a backup in case of replicator failure. (VOY episode: "Parallax")
On the colony world of Tarsus IV gardening was popular amongst the colonists. Many of the colonists sold foodstuffs they had grown in local produce markets. In response to the fungal infection that attacked the planet's food supplies colonists were forced to destroy gardens that had fallen victim to infection. After the crisis was over many of these gardens were rebuilt, but some colonists still maintained that there was a difference in the food before and after the crisis. (DSC novel: Drastic Measures)
Bajoran monasteries maintained large gardens on their grounds. Vedek Bareil Antos enjoyed gardening, wishing sometimes that he could engage in that profession full time instead of being a religious leader. (DS9 episode: "In the Hands of the Prophets")