It was not clear whether the attack by a man police said was unemployed was linked to the launch of the new government at a time of deep political divisions and social tensions exacerbated by a long slump in the euro zone's third largest economy.
Newly installed Interior Minister Angelino Alfano said the attack appeared to be an "isolated act" that did not suggest any wider security threat. But there were immediate calls for politicians to try to calm a volatile public mood.
"All political forces have to work together to lower the level of tension that the economic, social and institutional climate has already created," said centre-left parliamentarian Emanuele Fiano.
Letta, 46, the moderate deputy head of the centre-left Democratic Party (PD), on Saturday ended two months of political stalemate after February's inconclusive election when he united former political rivals in a broad coalition government.
The mix of centre-right and centre-left politicians and unaffiliated technocrats was largely welcomed in Italy's mainstream press on Sunday, especially for the record of seven female ministers and the relatively young average age.
However, the political risks that Letta faces were spelled out on Sunday by a close ally of centre-right leader Silvio Berlusconi who is a core stakeholder in the government.
Renato Brunetta, lower house leader of Berlusconi's People of Freedom party (PDL), said the government would fall unless Letta promised in his maiden speech to swiftly abolish an unpopular housing tax and repay the 2012 levy to taxpayers.
Letta is expected to set out his government's plans in parliament on Monday and will then need to win a vote of confidence in both houses to be fully empowered.
"If the prime minister doesn't make this precise commitment we will not give him our support in the vote of confidence," Brunetta told daily Il Messaggero.
Brunetta, who was himself a candidate for the post of economy minister, said that during negotiations for the formation of the government Letta had "given his word" on the abolition and repayment of the tax, which would leave an 8-billion-euro hole in public accounts.
New Economy Minister Fabrizio Saccomanni, formerly deputy governor of Italy's central bank, said he wanted to cut public spending and reduce taxes to revive an economy languishing in a recession set to be the longest since World War Two.
He made no reference to the housing tax. Attention on Sunday, however was focused on the dramatic shooting outside Palazzo Chigi, the prime minister's official residence.
Police identified the gunman as Luigi Preiti, in his forties, from Calabria, the southern region which has long suffered from high unemployment and organised crime.
Having fired several shots at the two police on duty outside the prime minister's office, he shouted "shoot me, shoot me" to other police officers nearby, police said.
One of the two officers was shot in the neck and was in a serious though not life-threatening condition, while the other was shot in the leg and less seriously hurt.
In a surreal scene, outgoing Prime Minister Mario Monti received the official trumpet salute in the courtyard of the renaissance Chigi palace before walking across the cordoned-off square past police crouching over the scene of the shooting.
Preiti was unemployed and separated from his wife, but had never suffered from mental illness, his brother told Italian news agency ANSA.
In the election Italians vented their anger at a discredited political class by giving 25 percent of votes to the anti-establishment 5-Star Movement led by former Comic Beppe Grillo.
Since the vote, divisions have deepened with millions of centre-left voters furious to see the PD split and then agree to govern with arch-enemy Berlusconi after its leadership, including Letta, had repeatedly ruled out the possibility.
PD parliamentarians have been subjected to abuse in the streets and Grillo rubs salt in the party's wounds with daily comments on his blog decrying what he sees as an indecent alliance to preserve the power and priveleges of the status quo.
Berlusconi, who had been widely written off after being forced from office in 2011 at the height of a debt crisis, has emerged as the big winner. He is now a vital part of the ruling majority and has placed several ministers in the cabinet, including the PDL's national secretary Alfano as deputy prime minister and interior minister.
Recent polls give him a lead of between five and eight percentage points over the centre-left, and many commentators believe he may bring down the government as soon as he is fully confident of winning an election.