Navy Secretary James H. Webb Jr., reversing a policy the Navy had already concluded was discriminatory, announced yesterday that women civilian employes will be allowed to participate in submarine sea trials on the same basis as men.

For Pamella M. Doviak Celli, a 42-year-old mechanical engineering technician at the Portsmouth, N.H. Naval Shipyard, the ruling ended a five-year dispute over regulations that barred her from a trial cruise on a submarine she was helping to repair in November 1982.

The Navy's grievance procedures had established that the policy discriminated against women, and Celli was offered financial compensation, which she rejected because the service would not guarantee a change in the rules. The Equal Employment Opportunity Commission also said the Navy had discriminated against Celli and ordered the service to change its policies.

Webb's decision reverses the position of his predecessor, John F. Lehman Jr., who rejected the Navy's findings of discrimination, appealed the EEOC rulings and refused to implement its orders to revise the rules.

Barely two months ago, Celli had taken her case to the federal court in Portland, Me., to try to push the Navy into changing its rules.

Yesterday's decision applies only to civilian employes and does not include female sailors, Navy officials said. A Navy spokesman said the decision would affect "a large number" of female employes, but said specific numbers were unavailable yesterday.

Webb also ordered that Celli be awarded attorneys' fees for her legal battle as well as back pay, overtime and benefits she would have received if she had been permitted to embark on the USS Kamehameha's sea trial in November 1982.

Under the new rules, men and women will be provided separate berthing accommodations on the submarines, but "separate sanitary facilities are not required," a Navy statement said. Sea trials usually last two to nine days.