WARSAW, Poland (AP) _ The Supreme Court refused Thursday to legalize a local union of Solidarity steel workers, but members said they would continue their activities despite police harassment and threats of dismissal.

In another development, a prison official said the outlawed labor federation's leader for the southern Silesia industrial area has been on hunger strike since Feb. 5 at a Katowice prison. Jan Andrzej Gorny is protesting what he describes as his ''unjust conviction.''

Gorny is serving 1 1/2 years on conviction of not paying alimony and using false identity cards. Jerzy Rybarczyk, a spokesman for the Central Board of Penitentiaries, said Gorny has been force-fed since Feb. 9.

Opposition activists said Gorny also was protesting denial of visits from his family, but Rybarczyk said that issue was resolved.

At the Supreme Court hearing, Chief Justice Jan Wasilewski upheld a lower court that ruled in December against registering the Solidarity local at the steel plant in Stalowa Wola, southeastern Poland.

Wasilewski said Polish law prohibits more than one trade union at a plant.

Dozens of Solidarity factory committees filed in the past year for legal recognition under a 1982 law that was supposed to provide for union pluralism. The Supreme Court has rejected all such appeals presented to it.

''We are going to continue ... our activities and widen them,'' said Wieslaw Wojtas, 31, who heads the Solidarity local's 33-member organizing committee.

He predicted management will treat the local's members ''more harshly'' now, but said they would resist any attempts to dismiss Solidarity activists.

''We have considered the possibility of declaring a strike but we will use it only as a last resort,'' he said in an interview after the hearing. ''We have many other means before that.''

Solidarity members at the Stalowa Wola plant have been watched, transferred to other jobs and summoned for talks with management, security police and local authorities, Wojtas said.

Wladyslaw Liwak, lawyer for the local, argued at the court hearing that prohibiting union pluralism violates international labor and human rights agreements signed by Poland and hinders efforts for economic reform.

Solidarity, the first free trade union movement in the Soviet bloc, was outlawed following a martial law crackdown in Poland in December 1981.