MAASTRICHT, NETHERLANDS — IT may be like pulling teeth, but the European Community will resolve enough of its internal differences to approve a new treaty on economic and political integration at its summit here this week.That was the reigning consensus as leaders of the EC's 12 member states gathered here yesterday for at least two days of difficult bargaining and compromise on the half dozen points that separate them from their goal of an "ever-closer union." The winter sun was shining and the EC's flag of 12 gold stars on a crisp blue field was fluttering all around this city on the Maas River. But that could not change the summit's somber, determined mood. "There is no joy here," said Dick Istha, chief spokesman for Dutch Foreign Minister Hans van den Broek, whose country holds the Community's six-month revolving presidency and is the summit host. "There will be an agreement, because not to have it would be too great a setback. But it will come at the last minute, with everyone holding out for his own interests." With an economic treaty closest to agreement, EC leaders took up that issue first. An advanced draft treaty on economic and monetary union was referred back to finance ministers for fine-tuning at the end of the morning, but a consensus was forming around a two-stage plan that would lead to a single currency for at least a majority of countries no later than 1999. "It is clear that a large majority [of countries] see that Maastricht is the beginning of a process of irreversibility," said Dutch Foreign Minister Wim Kok. But Britain's insistence that the treaty include an "opt-out" clause for countries not wishing to go along with monetary union was still a point of contention. Under the two-stage plan being discussed, at least seven countries would have to meet a set of rigorous economic "convergence" criteria for the move to a central bank and single currency, perhaps by 1996. The criteria would include tight fluctuation bands for inflation, public debts and deficits, and interest rates. If the central bank and single-currency agreement were not passed by 1996, a second vote, perhaps in 1998, would be taken on a majority basis and without the "critical mass" requirement. Some countries that do not yet meet the criteria argued against the divisive effect such requirements would have on the Community. But German Chancellor Helmut Kohl, whose country would be giving up its powerful and dominant deutsche mark under the plan, insisted that strict and objective economic criteria are necessary to ensure European monetary stability. British government sources, whose government supports the German position, claimed Mr. Kohl was even attempting to strengthen the criteria before final decisions were reached. EC leaders were to move into discussions of the thornier issues grouped under "political union" yesterday afternoon. Among the trouble spots remaining are European defense policy, extension of majority voting on foreign and security policy, inclusion of social policy in the Community treaty, and additional funding for the EC's poorer countries. Spain was also keeping the heat up on the EC's richer members to either accept treaty language guaranteeing new funding to poorer members, or risk a Spanish veto of any final text. "We are noting some signs of receptivity to our position," said Miguel Gil, spokesman for Spanish Prime Minister Felipe Gonzalez. "But this cannot be settled by any bargaining or gentlemen's agreement promising something for the future. It has to be in the treaty." Yet as the summit gets down to what French President Francois Mitterrand calls the "last five minutes of trading," bargaining among gentlemen unavoidably will take place. "At the end of [today] they'll throw everybody out, and it will be just the [country leaders] by themselves. And they'll make those last, difficult decisions."