Senior American and European Community officials opened last-minute talks today to prevent a farm trade war, amid signs that a negotiated agreement may be possible.

Spokesmen for both sides refused to comment on the talks, between a U.S. team led by Alan Woods, a deputy trade representative, and negotiators from the EC executive commission.

But officials said the EC was ready to offer concessions to the United States, which has threatened to place new tariffs on more than 10 Community agricultural products if a dispute over U.S. farm exports to the EC is not settled by July 1. The threat has prompted a promise of counter-retaliation by the EC.

The EC concessions would not permanently settle the dispute, but would allow "breathing space" while negotiations continued, the officials said. Further talks are expected during an EC conference in Annapolis next week.

The dispute, which one American official recently called the "most explosive trade issue in U.S.-EC relations," involves the loss of American farmers' access to markets in Spain and Portugal following the enlargement of the EC to include the two nations in January.

When the Iberian nations joined the community, they were required to put high tariffs on some U.S. farm imports and restrict purchases of other U.S. agricultural products.

In April, a temporary settlement was reached over access to the Portuguese market. In the case of Spain, however, the United States has demanded immediate compensation for the loss of American corn and sorghum sales, estimated at almost $600 million annually.

Officials said the EC concessions could include the lifting of the new tariffs on an unspecified amount of American corn exports to Spain.

Earlier this week, U.S. officials here said there were improved chances for a settlement, which they attributed to pressure on the commission from the EC member states.

The officials said the member states had instructed the commission to soften its negotiating position in the hopes of avoiding a trade conflict that could cause serious damage to European economies and spread to other parts of the European-American relationship.

One U.S. official said, "A number of people in the commission are happy . . . to play it out the negotiations for every inch."

But, the official added, "the member states want the commission to give more importance to EC-U.S. relations than winning every high school debating point in GATT law." GATT is the General Agreement on Tariffs and Trade.

The United States is apparently willing to let the talks extend a few days past the July 1 deadline if substantial progress is being made.

But U.S. officials have said that, because of strong protectionist pressure in the United States, especially from farmers, the Reagan administration could not be seen to back down in the dispute with the EC, or let talks go on indefinitely.