1660s, "disposed to live in flocks" (of animals), from Latin gregarius "pertaining to a flock; of the herd, of the common sort, common," from grex (genitive gregis) "flock, herd," from PIE *gre-g-, reduplicated form of root *ger- "to gather." Of persons, "sociable," first recorded 1789. Related: Gregariously; gregariousness.
"to work on or conduct a ranch, herd cattle," 1866, from ranch (n.). Related: Ranched; ranching.