Gerald W. McEntee, a Pennsylvania labor leader, yesterday was elected president of the American Federation of State, County and Municipal Employes, the nation's largest public workers union.

McEntee succeeds Jerry Wurf, who died of a heart attack Dec. 10 at the age of 62.

AFSCME's 25-member executive board, casting weighted ballots, chose McEntee over William Lucy, a black union leader who had served as Wurf's second-in-command since his election as secretary-treasurer in 1972.

Lucy would have been the first black president of a major U.S.-based union had he won. He received 449,911 of the electoral ballots cast by the board. McEntee won with 483,080.

The voting in the often dissension-racked union was conducted under the auspices of the American Arbitration Association, a New York-based, nonprofit corporation dedicated to resolving labor and other disputes outside the judicial system.

Lucy said yesterday that the political jockeying to succeed Wurf was "a very spirited contest" extending over the last three days. "There was an awful lot of give and take, and sometimes pushing and shoving," he said.

But he said the election is behind him and that he will work with McEntee to "pursue the long-range goals and objectives" of the union, which is preparing for contract negotiations that will affect 500,000 of its members next year. AFSCME has a membership of about 1 million.

McEntee said he does not believe his election will create any racial ill-will in the nearly 25 percent black union, as was suggested yesterday by several AFSCME staffers and officials.

"AFSCME is, I think, probably the most effective force in the civil rights area," McEntee said. He said he does not believe that AFSCME has ever had a racial problem "because of the kind of union that it is." He said that he and Lucy will be able to handle any racial discord "shoulder to shoulder," should such problems arise.

In his prepared statement, McEntee said it would be inappropriate for him "to give . . . more than the broad outlines of the policies" he will pursue as president of AFSCME because of "the sudden circumstances of his election." But he wasted little time continuing one of Wurf's hottest pursuits: attacking the economic policies of the Reagan administration.

"In less than a year, Mr. Reagan's policies have severely handicapped the ability of state and local government to provide essential public services," McEntee said. As a result, he said, next year's contract bargaining will be difficult for his members.

"You can be certain of one thing. During my tenure, we will defend this union's members and organize those who are not members. We will do these things with all the force and effectiveness that Jerry Wurf brought to the task," he said.

McEntee, 46, had served as executive director of AFSCME Council 13 in Harrisburg, Pa., the state's largest public employe unit, since 1973. He began his union career in 1958 as an AFSCME organizer in Philadelphia where his father, William, was the chief organizer of AFSCME Council 33.

McEntee, a native of Philadelphia, holds a B.A. degree in economics from LaSalle College. He is the father of four daughters