France's leading Gaullist politician strongly endorsed the Reagan administration's nuclear rearmament program yesterday, saying that the dangers of East-West confrontation have become so great that France and the United States must put aside long-standing differences and seek common ground on defense and economic policies.

"Whenever the free world confronts real international problems, you will find that any French government--Gaullist, Giscardist, or today the Socialists--will be the closest ally of any to the United States, from Cuba in 1962 to Euromissiles today," said Jacques Chirac, mayor of Paris and head of the Gaullist party.

In an interview shortly before he met with President Reagan at the White House, Chirac identified French concern over "the very dangerous evolution of the political situation in West Germany" as the driving force behind a surge of strong, open French support across the political spectrum for Reagan's Euromissile deployment program, already endorsed by Socialist President Francois Mitterrand.

"The decrease of will in Germany" to resist Soviet military buildups, as evidenced by "shocking" statements made by opposition Social Democratic leaders before and during a visit to Moscow this week, has also caused the Gaullists to lean toward the immediate production by France of neutron, or enhanced radiation, weapons, Chirac said, adding: "For political reasons, not for technical military ones."

Chirac, who served as prime minister for president Valery Giscard d'Estaing from 1974 to 1976 before angrily breaking with him, is widely viewed in France today as the most serious opponent on the right for Mitterrand, who defeated Giscard for a seven-year term in 1981.

Chirac acknowledged that the kind of open support he voiced in Washington yesterday for American policies represented something of an evolution for the Gaullists, who have traditionally looked on the United States with suspicion and who have frequently challenged American defense policies with a prickly insistence on national independence. The Gaullists have frequently criticized other French parties for being too "Atlanticist" if they praised Washington.

"Gaullist thinking is a pragmatic, not a doctrinal, way of thinking," he said in response to a question on this point. "It changed when the world changed. Nobody knows what Charles de Gaulle would do today, but I do believe he would say the same today. As long as detente was possible, and international problems were not too difficult, we would say we want to be free to do what we want, even if it doesn't please the United States or the Soviet Union.

"But when it appears that there is a real danger, we say, okay, we still want to be independent, but we also have to be united in the face of threat," Chirac continued. "This is a change in the situation, not in Gaullism. If tomorrow everything is okay, an agreement with Russia allows a new detente, then I would put first again our economic, agricultural, managerial or other interests against the United States or anybody else."

Chirac met with Reagan for about 20 minutes yesterday to open a two-day visit that the Reagan administration is treating with importance and sympathy. Reagan and Chirac, whose philosophies run parallel on a number of points, have had friendly relations since the American leader visited Paris in 1978 as a prospective presidential candidate and was shunned by French politicians except for Chirac's camp.

The Paris mayor is also due to have separate meetings here with Vice President George Bush, Secretary of State George P. Shultz, Secretary of Defense Caspar W. Weinberger and other senior officials.

The Gaullists control about a fifth of the seats in the French National Assembly and can normally count on support from about a fourth of the electorate. They have been pushed off balance by Mitterrand's warm embrace of Reagan's nuclear rearmament program and the resulting initial period of good relations between Paris and Washington. That development subsequently was dampened by the European-American dispute over the Soviet natural gas pipeline being built to western Europe.

Although Chirac originally opposed French participation in the pipeline, he did not challenge Mitterrand's handling of the dispute with the United States, since the Gaullists would not want to be seen to be undermining a French president standing up against Washington.

Engaged in an active campaign for reelection as mayor in March, Chirac appears to see the trip to Washington as an opportunity to counter the Socialist backing for Reagan's defense policies and to enhance his own image as a serious international figure.

As if to dispel the criticism at home that his hard-charging, energetic style masks a lack of attention to substance, Chirac dwelled in the interview on two themes that also dominated a speech at Georgetown University's Center for Strategic and International Studies and his brief remarks to reporters after his meeting with Reagan--international economic issues and defense.

Praising Reagan's decision to send Bush to Europe later this month to sound out allied countries on strategic problems, he stressed in the Georgetown speech the need for closer consultation within NATO, even though he said France did not intend to rejoin its military structure.

"An American commitment to discuss strategic and tactical nuclear problems with the Soviets only after concertation with Europeans" is an essential part of a needed modernization of the alliance, Chirac said. He also called for "an unequivocal American commitment to defend the territory of their allies at their very borders" as a way of "dispelling neutralist feelings" spreading in Europe. "It presupposes that there is no doubt left as to the implementation of the flexible response theory."

Asked why neither the Giscardists nor Gaullists had openly endorsed the deployment of Pershing II and ground-launched cruise missiles before Mitterrand did shortly after coming to power, Chirac cited the splits on this issue that surfaced in West Germany's Social Democratic Party and helped bring Helmut Schmidt's government down last October.

"President Giscard and all of us in the former majority had exactly the same thought about the Euromissiles, but since it did not involve French soil, we did not feel we had to say anything, and we didn't as long as there was no problem. Now, because of the very dangerous evolution of the political situation in Germany, Mitterrand has had to say in a very loud voice what everybody thought quietly--everybody, that is, except the French Communists, of course."

That same concern has pushed neutron weapons up the list of Gaullist defense priorities, Chirac said. Mitterrand has said that France is close to a decision on producing them. The Gaullists have previously backed putting funds into conventional forces before the neutron, but Chirac indicated yesterday that a show of resolve on nuclear modernization would win Gaullist support now.

Originally an enthusiast on Reaganomics, Chirac was more pessimistic about the results of the deflationary monetary policies followed by the United States over the past three years, and he warned of the dangers of a U.S. budget deficit on the order of $200 billion. He suggested this would snuff out any chances of global economic recovery.