The town was founded some time in 14th century in dense forests covering the area back then. The first mention dates back to August 14, 1358, when a chronicler noted Goniądz as a seat of a powiat within the land of Wizna. On December 2, 1382, the dukes of Mazovia (Siemowit IV and his brother and co-regent Janusz I) awarded the Wizna castle, together with the surrounding land, to the Teutonic Order. The land was bought back from the Teutons in 1402, but at the same time the order sold it to the Duke of Lithuania. Because of that, the town was disputed by both the Kingdom of Poland, Duchy of Mazovia and the Duchy of Lithuania, with the latter state briefly gaining the upper hand.
Eventually the series of Polish-Lithuanian Unions resulted with the town being somewhat of a borderland: owned by noble houses from both sides of the border, with laws of both states applied. In 1430 the duke of Lithuania Vytautas founded a church there. Other owners of the town also expanded the small castle, the most notable of them being Prince Michał Gliński, Mikołaj Radziwiłł and Zygmunt August, the future king of Poland. In 1547 Goniądz was granted with a city charter, modelled after the Chełm law. Four years later king Zygmunt August decided that only Polish law be applied for the land surrounding Goniądz and finally in 1569 the town was annexed by Poland and remained within its borders until today.
In 1572 Goniądz became part of the starostship of Knyszyn and the following year the Sejm, or the Polish parliament, confirmed the city charter. The town continued to grow rapidly and in 1579 was granted with the right to trade with salt, one of the most expensive minerals back then. On May 28, 1621 a huge fire destroyed the town, but it was quickly rebuilt and by 1667 became a seat of local administration. By 1765 the town had 243 houses and roughly 1500 inhabitants, mostly Poles, but also Jews and Tatars. In 1775 a new church was erected by bishop of PrzemyślAntoni Betański.