A labor union representing white-collar transit workers has ended a bitter six-year dispute with Metro by agreeing to sign a controversial contract providing annual pay increases of 3 to 3.5 percent, markedly less than the union sought.

Union leaders last week dropped their threats of a possible court challenge and said they would sign the accord. The contract would be the first between the transit authority and Local 2 of the Office and Professional Employees International Union, which represents about 500 Metro workers.

"It's not, obviously, as much as we hoped for," said James Sheridan, president of the local. But he said the contract would "improve relationships" with Metro and provide some benefits for union members. The authority had threatened to withhold the benefits if the union balked at signing, Sheridan added.

The tangled dispute long had been regarded as an indication of severe shortcomings in Metro's relations with unions. Metro General Manager Carmen E. Turner recently has taken steps to bolster labor relations and has said the contract with Local 2 is likely to "provide an important period of stability."

The union, which represents clerical, administrative and professional employes, is the second largest at the authority. Local 689 of the Amalgamated Transit Union is the largest, representing about 5,500 bus drivers, train operators, mechanics and other workers.

Members of Local 2 include secretaries, clerks, accountants, computer specialists, lawyers, engineers and planners. Their salaries range from about $10,000 to $50,000 a year.

The contract, which is expected to be signed shortly by union and Metro officials, resulted largely from an arbitration award sharply denounced by union negotiators. The contract dispute was submitted to a three-member arbitration board last May after negotiations collapsed.

In the Dec. 31 award, the arbitration panel rejected the union's principal wage demands. The award provided for 3.5 percent raises in each of the contract's first two years and 3 percent in the third.

The union had sought 6.5 percent raises, equivalent to those won by the Amalgamated Transit Union two years ago. Local 2 also had pressed for a sizable "catch-up" wage increase, contending that its members long had been paid less than other Metro employes for similar work.

Thomas R. Roth, the union's representative on the arbitration panel and president of the Washington-based Labor Bureau Inc., refused to sign the award. In a Jan. 22 dissent, he criticized the award as "seriously defective," "offensive" and "punitive."

Metro officials described the award as a "balanced decision" and noted that the panel endorsed the union's demand for compulsory union membership by employes within the Local 2 bargaining unit, a requirement opposed by the transit agency.

Metro and Local 2 officials had clashed repeatedly in recent years. In 1981, General Manager Richard S. Page threatened to fire about 300 union members, including 10 bargaining committee representatives, unless they ceased their union activities. Metro dropped the threat two years later.

At the same time, the agency agreed to provide several hundred thousand dollars in back pay to about 250 union members after a federal judge ruled they were improperly denied raises. The authority agreed to start contract negotiations in 1983 only after a federal appeals court upheld union claims.

Despite last week's agreement, some key issues remain in dispute. Metro officials said they will seek to have about 100 employes excluded from the union, arguing that they are supervisory workers. The union has challenged this contention.