Rep. William H. Gray III (D-Pa.) told the National Urban League convention yesterday that the Democratic Party has been moving "slowly" in helping minorities and that he thinks that blacks and women will have to change the party to achieve their goals.

In a spirited speech filled with biblical metaphors and a preacher's cadence, Gray, the chairman of the House Budget Committee, attacked the Republican Party for "taking from the needy and giving to greedy."

Gray told the audience that he had "chosen the Democratic Party despite its faults and its failures" and said he won his congressional seat by fighting former Philadelphia mayor Frank Rizzo and the Democratic Party leadership in Pennsylvania.

"But really the question minorities must ask themselves," he said, "is which vehicle political party is moving in the right direction, even if it is slowly, haltingly. The one moving toward Canaan a spiritual promised land or the one moving toward Egypt a place of corruption, in the analogy ."

Gray said he chose the Democratic Party "in the hope that my presence can make it move a little faster . . . . " But he said women and minorities will have to "get off that vehicle and walk that last mile to freedom by themselves."

Gray said later that minorities and women will have to "outside the party and redefine its goals and then wait for the party to catch up." He said he does not favor having blacks desert the party.

"The vehicle can only go so far," he said. "So then we will have to push the vehicle or walk down the road and say, 'Come on.' "

Senate Majority Leader Robert J. Dole (R-Kan.), in a separate appearance, defended his party, saying that the "light of conscience has not gone out." He cited himself and a half-dozen other Republicans in Congress as evidence that Republicans are not "insensitive to the needs of the disadvantaged and poor."

"If you don't like what you see in the Republican Party, and not many groups are perfect, the best way to bring about change is to join the internal debates . . . ," Dole said.

"So now some experts say, 'Why bother? The Republican Party doesn't need the black vote anyway, and besides they're blacks tied permanently to the Democratic Party,' " he added. "Now I don't subscribe to this theory, as I believe that over the next several years we can move more quickly toward majority status if inroads are made into the black vote."

Rep. Mickey Leland (D-Tex.), head of the Congressional Black Caucus, attacked the Reagan administration, saying that blacks "have fallen prey to a willful, deliberate policy of terrorizing the spirit and substance of those mired in urban and rural poverty . . . . "