You might have trouble figuring out gainsay if you're thinking of our modern gain plus say. It should help to know that the gain- part is actually related to against—specifically the Old English prefix gēan- ("against, in opposition to"). From that came Middle English gain-, which was joined with sayen ("to say") to form gainsayen, the Middle English predecessor of gainsay. So when you see gainsay, think "to say against"—that is, "to deny" or "to contradict."
contravene implies not so much an intentional opposition as some inherent incompatibility.
laws that contravene tradition
Example Sentences
it can't be gainsaid that most people wish they had more time and money repeatedly tried to gainsay me, though every point I made was backed up by facts
Recent Examples on the WebAnd if the judges are ever to gainsay the popular will with just cause, their institutional independence is the bulwark of their authority to do so. Matthew J. Franck, National Review, 12 Sep. 2021 Great poems often gainsay in the very act of saying. Matthew Bevis, The New York Review of Books, 26 Sep. 2020 Some of the yo-yoing on display has been the product of mindless, gainsaying partisanship. Charles C. W. Cooke, National Review, 16 Apr. 2020 Yet what’s most original in the film is Mercier’s scathing and self-scourging performance (and there’s no gainsaying the importance of Yoav’s outfit, a collarless saffron-yellow coat). Richard Brody, The New Yorker, 26 Sep. 2019 Crime waves are often linked to economic downturns, but this hypothesis is gainsaid by counterexamples, such as the relatively low crime rates during the 1930s depression and the 2008–2010 recession. Michael Shermer, Scientific American, 1 Nov. 2018 The courage and cleverness in staying in power for so long cannot be gainsaid.The Economist, 7 Sep. 2019 But there’s no gainsaying his historic significance. Peter Schjeldahl, The New Yorker, 19 Aug. 2019 Her role in passing the Affordable Care Act was absolutely heroic and should not be gainsaid. Isaac Chotiner, The New Yorker, 18 July 2019 See More
Word History
Etymology
Middle English yein seyen, gein-seyen "to speak in opposition to, deny," from yein-, gein- "away, back, against, in opposition to" (going back to Old English gēan- "in opposition to," or marking returning or reciprocal action, going back to Germanic *gagna-) + seyen "to say entry 1" — more at again