The politically influential Washington law firm founded by the late Giant Food chairman Joseph B. Danzansky and Raymond R. Dickey will merge early next year with a large New York law firm that includes former New York Mayor Robert F. Wagner among its partners.

The merger, one of the largest among law firms in recent years, is designed to give the New York firm a Washington presence and at the same time catapault the smaller D.C. firm into a full national practice with satellite offices in Miami and Beverly Hills.

The new firm will operate under the New York firm's name of Finley, Kumble, Wagner, Heine, Underberg & Casey. The local D.C. firm, Danzansky, Dickey, Tydings, Quint & Gordon, will take second billing on the letterhead in parenthesis.

The merger will become effective on Feb. 1, 1981. After more than a year of negotiations, the merger was disclosed in New York yesterday to the National Law Journal.

Steven Kumble, a senior partner in the New York firm, said the merger talks were "long and arduous," but that the merger agreement will give equal status to partners from both firms. By the time the merger takes effect, he said, the combined firm will consist of 190 lawyers, making it among the top 25 U.S. law firms, in terms of size.

Both firms have partners with strong political affiliations. The two partners from the D.C. firm who were in New York yesterday for the merger announcement were former Sen. Joseph D. Tydings of Maryland, and Robert B. Washington Jr., D.C. Democratic Party chairman and member of the Democratic National Committee.

Danzansky died a year ago, but his son, Stephen, is a partner in the firm and is active in Republican politics.

The political activism of the Danzansky firm was partially illustrated in recent newspaper articles showing that Danzansky, who was chairman of the National Bank of Washington during the last year of his life, supported a move by Washington to set up a $50,000 line of credit from the bank for the 1978 D.C. mayoral campaign of Sterling Tucker. In so doing, the bank and the campaign officials circumvented city election laws setting limits on contributions and the use of intermediaries to make contributions. Both Danzansky and Washington were actively involved in Tucker's unsuccessful campaign.

The other founder of the D.C. firm, Dickey, resigned earlier this year, saying that he did not agree with the firm's push to grow far beyond its 40-lawyer contingent and subordinate it s local practice to one that is more nationally oriented.

Wagner served as New York mayor from 1953 to 1965 and now serves as President Carter's personal envoy to the Vatican. The partners in the New York firm also include Nathaniel L. Goldstein, New York's attorney general for 12 years, and Sheldon H. Lytton, former chief of staff to California's lieutenant governor, Mike Curb.

The move to Washington by the New York firm is part of the decade-old migration of large, out-of-town firms to Washington where industrial and corporate clients need virtually daily representation before federal regulatory agencies.

Kumble said that the clientele of the combined law firm will include 43 companies whose securities are traded on the New York or American stock exchanges, 11 companies on the "Fortune 500" list, 32 domestic banks, six foreign banks and four foreign governments or the ministries of those governments.