The ruling by the Warsaw-based constitutional court came after a motion by conservative Prime Minister Mateusz Morawiecki, who brought the case in March as part of a dispute with the EU over changes to Poland's judicial system.
The verdict appeared to question a key tenet of European integration and added to friction between Warsaw and Brussels.
The judges handed down their decision after the EU accused the Polish government of politicizing the country's courts, including the Constitutional Tribunal.
Polish government spokesman Piotr Müller said in a comment that "the primacy of constitutional law over other sources of law results directly from the Constitution of the Republic of Poland."
He added: "Today this has (once again) been clearly confirmed by the Constitutional Tribunal."
Critics at home and abroad have argued that challenging the supremacy of EU law could harm Poland's future in the bloc and undermine the stability of the 27-nation European Union.
Opposition politicians in Poland have slammed the government for putting the country on a collision course with Brussels, warning that questioning the primacy of EU law could eventually result in a "Polexit," or Poland's departure from the bloc.
The leader of the governing conservatives, Jarosław Kaczyński, last month ruled out any plans to take his country out of the EU, saying that "there will not be any Polexit whatsoever."
He added that "such claims" were "a propaganda trick," employed "repeatedly" by his party's political opponents.
"We see Poland's future unequivocally in the EU, but want to resolve the crisis currently besetting the bloc," Kaczyński said in a media interview.
Amid a long-standing dispute over whether national law takes precedence over EU law, the Polish Constitutional Tribunal in July ruled that interim measures imposed by the EU’s top court on Poland's justice system were against the national constitution.
Most Poles say national law has primacy over EU law: survey
Meanwhile, most Poles believe that their national law takes precedence over European Union law, according to a survey.
Seventy-eight percent of those polled by the Dziennik Gazeta Prawna daily and private radio broadcaster RMF FM last year said the Polish constitution had primacy over the laws of the European Union, of which Poland has been part since 2004.
Sixty-three percent said national law as a whole should take precedence over EU law, according to a report.
Polish judicial system 'deeply flawed': PM
Poland's governing Law and Justice (PiS) party, which came to power in late 2015 and secured a second term in October 2019, has argued that broad changes are needed to reform an inefficient and sometimes corrupt judicial system marred by communist holdovers.
The changes have triggered a series of clashes between Warsaw and Brussels.
The Polish prime minister has said that some of the legal changes made by his conservative government have met with criticism abroad because they are not understood in Western Europe.
Prime Minister Mateusz Morawiecki argued in 2017 that his country’s judicial system was “deeply flawed” and that his ruling conservatives were elected with a mandate to overhaul it.
Source: IAR, PAP, Reuters