The Ramayana is believed to have been written circa 300 BC and is the most popular Hindu classic.
Then battered down the garden door.
Five captains of the host be slew,
[Ramayana CANTO I] Note: a garden is a gated place, and probably walled
Through grove and garden, undismayed,
From house to house the Vánar strayed,
And still his wondering glances bent
On terrace, dome, and battlement:
Then with a light and rapid tread
Prahasta's home he visited,
And Kumbhakarna's courtyard where
A cloudy pile rose high in air;
And, wandering o'er the hill, explored
The garden of each Rákshas lord.
[Ramayana CANTO VI] Notes: (1) this describes a fortified palace (2) gardens are distinguished from courtyards (3) each lord has a garden
There Champac and As'oka flowers
Hung glorious o'er the summer bowers,
And mid the waving verdure rose
Gold, silver, ivory porticoes.
Through all the months in ceaseless store
The trees both fruit and blossom bore.
With many a lake the grounds were graced;
Seats gold and silver, here were placed;
Here every viand wooed the taste,
It was a garden meet to vie
E'en with the home of Gods on high.
[Ramayana CANTO X] Notes: (1) this is a graphic account of the relationship between a portioced palace and its garden (2) the garden has an informal character with flowers, seats and ponds.
He viewed the herds of gentle deer
Roaming the garden free from fear.
As through the sacred grove he trod
He viewed the seat of many a God,
[Ramayana CANTO XII] Note: it seems likely that the grove in which deer roamed was separated from the garden.
In kingless realms no princes call
Their friends to meet in crowded hall;
No joyful citizens resort
To garden trim or sacred court.
[Ramayana CANTO LXVII] Notes (1) the garden is tended (2) a garden needs the protection of a king (3) gardens and sacred courts are grouped together as places of resort
Shaking the earth beneath his tread,
He stamped his furious foot and said:
'To the As'oka garden bear
The dame, and guard her safely there
Until her stubborn pride be bent
By mingled threat and blandishment.
See that ye watch her well, and tame,
Like some she-elephant, the dame.'
They led her to that garden where
The sweetest flowers perfumed the air,
Where bright trees bore each rarest fruit,
And birds, enamoured, ne'er were mute.
[Ramayana CANTO LVI] Notes: (1) to be a secure place for Sita's imprisonment, the garden must have been enclosed, (2) the garden was a place for assembling rare fruits and flowers.
In kingless realms we ne'er behold
Young maidens decked with gems and gold,
Flock to the gardens blithe and gay
To spend their evening hours in play.
[Ramayana CANTO LXVII] Note: the social use of the garden for pleasure and display.
See also Villiers-Stuart comment on the Gardens in Mahabharata and Ramayana.