Italy's Socialists today made significant gains in important local Italian elections that could influence attempts to end this country's latest government crisis or at least the composition of a new Italian Cabinet.

The ruling Christian Democrats suffered moderate losses in central and northern urban centers, and the powerful Italian Communists did badly in the South, although elsewhere in Italy they held their own.

No parliamentary seats were at stake in the elections held Sunday and Monday, in which 9 million Italians, about a fourth of the electorate, voted for the first time since 1976 to choose a new regional assembly in Sicily, two provincial councils and 193 city councils, including those in Rome, Enoa and Bari.

But coming in the midst of a political crisis caused by a far-reaching scandal involving a controversial Masonic lodge, the vote was considered an important test of the national political mood.

The Republican premier-designate, Giovanni Spadolini, who last week formally accepted a bid to form a new government, deliberately refrained from attempts to form a Cabinet until the five future coalition parties -- the Republicans, Socialists, Christian Democrats, Social Democrats and Liberals -- could take stock of their respective political standing.

Sharp voting variations are unusual in Italy, so by Italian standards the clear winners were the Socialists who made more or less uniform gains of about 4 percent throught the country.

With about half the vote counted in city elections for the 193 councils, the Socialist polled 15.8 percent as compared to the 9.5 percent they polled in the 1979 general vote. The Christian Democrats polled 30.4 percent and the Communists 31.9 percent.

Socialist Party leader Bettino Craxi told reporters tonight the party's good showing would not change its "constructive" line in negotiations for a new government. But observers here expected him to somewhat up the ante for his support and ask for more or better Cabinet posts.

The effects of the Masonic scandal on voting patterns was difficult to ascertain in elections that are often decided on local issues. Despite the fact that many Socialists were on a list of suspected members of the P2 lodge, which is suspected of plotting subversive activities, the party did better than ever. And the small Social Democratic Party, whose leader was on the list, also made gains.