Abarim Publications' online Biblical Hebrew Dictionary
It's not clear which came first, the verb גדר (gadar), meaning to build a wall, or the noun גדר (gader), meaning a wall, but they obviously derive from each other.
The verb גדר (gadar) means to build a wall or to wall something up. But curiously, this verb occurs almost only in a figurative sense.
Both Job and Jeremiah complain that YHWH has walled up their ways so that they can not pass (Job 19:8, Lamentations 3:9). Through Amos, YHWH promises to repair the breaches in the fallen booth of David (Amos 9:11), through Isaiah He explains that this will be done by humans (Isaiah 58:12) but via Ezekiel He asserts that He hasn't been able to find one to do it (Ezekiel 22:30) because the prophets of Israel have failed to wall up the house of Israel, to stand in the battle on the day of YHWH (Ezekiel 13:5). The only times this verb is used for literal wall building is in 2 Kings 12:13 and 22:6, where the text speaks of wall-builders or masons.
The derived or parent noun of the verb is the masculine גדר (gader), meaning wall (Numbers 22:24, Psalm 62:3, Proverbs 24:31, Micah 7:11). The feminine equivalent is the noun גדרה (gedera) or גדרת (gederet), also meaning wall (Numbers 32:24, Psalm 89:40, Nahum 3:17).