A gag was a piece of cloth used to impede the speech of individuals to enable their capture and restraint.
In 2268, the drill thrall Tamoon was left bound and gagged in Pavel Chekov's holding cell after he escaped. (TOS: "The Gamesters of Triskelion")
In 2365 while playing Sherlock Holmes Program 3A, Data, as Sherlock Holmes, surmised that Doctor Pulaski was gagged and bound, as they could not hear her crying for help. (TNG: "Elementary, Dear Data")
In 2366, William T. Riker put a gag in Fento's mouth just prior to exiting the Mintakan hall. (TNG: "Who Watches The Watchers")
In 2370, Quark was gagged when he was assaulted and branded by a group of Bajorans aboard Deep Space 9. (DS9: "The Homecoming")
In 2373, Harry Kim put a gag over Eliann's mouth after he tied her arms behind her in his room. (VOY: "Favorite Son")
In 2374, Chakotay was gagged by Namon when he found him in the woods. He then brought him into the Vori camp. (VOY: "Nemesis")