'Terrain' is Latin for 'a piece of ground' — from 'terra' (earth, from PIE 'to dry').
A stretch of land, especially with regard to its physical features; the character of a tract of land in terms of its suitability for a particular purpose, especially military operations or building.
From French 'terrain' (piece of ground, field), from Vulgar Latin '*terrānum,' from Latin 'terrēnum' (ground, earth), neuter of 'terrēnus' (of earth, earthly), from 'terra' (earth, land). The PIE root is *ters- (to dry). Key roots: *ters- (Proto-Indo-European: "to dry").
The English words 'terrain' and 'terrace' are doublets — both descend from Latin 'terra' through French, but they entered English at different times with different specializations. 'Terrace' arrived in the sixteenth century meaning a raised flat area of ground. 'Terrain' arrived in the eighteenth century meaning the physical character of ground. Same root, different imports, two centuries apart.