Officials at the Lenin Shipyard in Gdansk refused today to reinstate Lech Walesa to his former job as an electrician, at least for the present, but the labor leader vowed to go back to work and denounced authorities for using "special ploys" and "administrative obstacles" against him.

Walesa, who led the now-banned Solidarity trade union during 16 months of national social upheaval and was then detained for 11 months by the government, walked to the shipyard gate this morning and requested his old job, but officials there informed him that he must first make certain arrangements with the Gdansk district's central administrative office.

In a declaration to reporters that accompanied a letter to the shipyard officials formally requesting reinstatement, Walesa said after his attempt today that he was waging a principled battle for the right to work.

"I must stand on the hard ground of principles clear and certain for everybody," Walesa stated, complaining of being singled out for harassment. "Fighting for my rights, I fight for the rights of normal working people."

It was Walesa's first visit since being freed in November to the place where he gained international fame for leading the August 1980 strike that gave birth to the Soviet Bloc's first independent trade union.

The event contained more than a little political theater purposefully staged by Walesa. Knowing he was not likely to be reinstated quickly, Walesa informed western press organizations of his plans Thursday through friends here. When he approached the yard's gates, Walesa was surrounded by rings of photographers and reporters, a scene that recalled the heady union organizing days of 1980 and 1981 before the government declared martial law. That crackdown was eased Jan. 1.

The shipyard's management informed Walesa at the yard's entrance that before he could return to work, he needed certification that he was not employed elsewhere and a statement from regional authorities regarding Solidarity's finances.

Walesa returned to the shipyard a second time in the early afternoon to protest the requirements, The Associated Press reported. Authorities strengthened security at the shipyard for Walesa's visits, posting about 20 trucks and vans loaded with police outside the main gate.

More than a dozen Solidarity supporters stood outside the gate as Walesa applied for his old job, clapping their hands and waving the "V-for-victory" sign that has become a Walesa trademark.

Walesa, an electrician, worked in the shipyard from 1967 until 1976 when he was dismissed because of overzealous union activities. He was reinstated in August 1980 as authorities sought desperately to appease those leading the protest that was then beginning.

Walesa subsequently gave up his job at the shipyard when he took over regional and national management of Solidarity. But his claim to be reinstated at the yard is based on a Polish law ensuring that a worker who engages in full-time union activity can return to his job when he gives up his union work.

In turn, the shipyard management is making a case that it might have been relieved of responsibility for Walesa when the district administration took over payment of Solidarity staff in the region, and thus it directed Walesa to district headquarters first.

It is also doubtful that Poland's Communist authorities are eager to see Walesa back at the site where he, and Solidarity, were launched.

Having failed to win the former union leader to their side during his long internment, government officials have appeared intent on destroying him as a political force in Poland. On one hand, they tried to ignore him as a private citizen not to be bothered with, while on the other they forcibly prevented him in December from delivering a major speech in Gdansk and attacked him for letting slip an incautious phrase equating German and Polish suffering caused by World War II in an interview with a West German magazine.

But there are evident limits to such tactics. Although the Polish Communist Party's official paper assailed Walesa for alleged tax evasion and other serious financial irregularities in the handling of Solidarity's finances, the government has indicated it does not intend to prosecute him.

Since his release, Walesa has displayed much of the same canny political sense and flair for symbolic gestures that won him national and international attention. Ever careful in his public remarks--he has avoided sensitive issues like the Solidarity underground and new official trade unions--Walesa gives the impression that he still believes he has an important political role to play.