Members of the National Football League Players Association voted yesterday by a three-to-one margin to ratify a five-year collective bargaining agreement with the NFL, ending officially their 57-day strike against the league.

Ed Garvey, executive director of the NFLPA, announced the vote at a press conference at union headquarters last night after player representatives from 26 of the NFL's 28 teams collected signed ballots from their teammates and telephoned the results to the union.

Wire service reports said two teams, the Chicago Bears and Detroit Lions, rejected the contract.

"We're delighted that it's finally over," said Garvey, adding that he hopes the contract can be signed Friday in Washington.

A team-by-team survey by The Associated Press found that many of the clubs that disclosed their votes had gone overwhelmingly for the contract, and one, the San Francisco 49ers, voted unanimously to ask for Garvey's resignation. That move was led by tight end Russ Francis, a critic of union policy during the strike.

Jack Donlan, the NFL's chief labor negotiator, said, "We're happy with the vote." But he said before a final agreement can be signed, there must be a settlement of an unfair labor practice complaint pending against the NFL and a union lawsuit challenging the validity of the NFL's standard labor contract.

Yesterday's vote came 22 days after negotiators for both sides reached a tentative settlement in New York, ending the walkout after eight weekends of games had been called off. One weekend will be made up Jan. 2 and 3, and two weekends were played before the strike began Sept. 20, making a regular NFL season of nine games, shortest in the league's history.

Some player representatives declined to disclose how their teams voted, but others reported ratification by large-to-overwhelming margins.

The Minnesota Vikings, for example, voted 55-0 to accept, the San Francisco 49ers voted 31-2 to ratify, with three abstentions, and the New York Giants were 47-5 in favor, taking their vote so quickly player rep Beasley Reece wasn't even asked to explain the latest developments.

Members of the Dallas Cowboys, Tampa Bay Buccaneers and Los Angeles Rams said their teams had voted overwhelmingly in favor, although they did not disclose the vote, and a member of the Atlanta Falcons said they had approved it, although Garvey said he hadn't seen that vote. It was also reported that the Buffalo Bills had approved the contract by a 2-1 margin.

The Houston Oilers and Baltimore Colts also voted to approve.

Neither the Bears nor the Lions disclosed the margins of their antiratification votes, although Detroit's Stan White said the Lions had turned down the agreement "by more than a 2-1 margin."

The contract approved yesterday runs through the 1986 season and, according to the league, sets aside a total of $1.6 billion in player costs over that period. In most major respects, it is the same as the tentative settlement reached Nov. 16, but both sides have been meeting in the interim to clarify language and reach agreement on issues in dispute.

Although the union failed to achieve some of its most widely publicized demands -- a guaranteed percentage of the NFL's gross revenues and establishment of a trust fund to pay player salaries -- it did achieve more limited objectives.

It won establishment of a seniority-based minimum wage scale, although the salary levels are less than current NFL averages at most experience levels.

The union also won severance pay upon retirement from football and a total of $60 million in bonuses. "I am in no way suggesting that we got what I wanted or what the executive committee wanted," said Garvey. "But a lot of improvements were made because of the strike . . . Management will never again take lightly the threat of the union to shut down the industry."