Bombing of Rome was repeatedly postponed on "political, cultural and religious grounds" (Overy, The Bombing War: Europe 1939 - 1945). There were factions in Britain and America for and against targeting Rome. Roosevelt, facing elections with Italian-American and Catholic voters, was initially against it; Churchill, without such considerations, had no objections. The Archbishop of Canterbury wrote to the Secretary of State for Air asking for Rome to be spared but Sinclair replied that military objectives must be hit regardless of their proximity to old buildings. Charles Portal, Chief of the Air Staff, was in favour (though he noted that some of his crews were reluctant to bomb targets such as Rome, Florence or Venice); Anthony Eden and the Foreign Office were strongly opposed.
The Foreign Office view held sway until Operation Husky, the invasion of Sicily. Eisenhower's headquarters identified two rail marshalling yards in Rome important for moving German reinforcements and sought permission to bomb them. The yards were three miles from the Vatican so the attack was sanctioned providing the crews were carefully briefed on the importance of accuracy.
Leaflets were dropped on July 18th warning of the attack, which followed on the 19th, led by Jimmy Doolittle (of the eponymous raid on Tokyo) who offered Catholic pilots the opportunity to step down, though none did (Hassner, Religion on the Battlefield). The Vatican was avoided, though the Basilica of St. Lorenzo was damaged. Communiqués were promptly issued emphasising the purely military targets, though there was also a considerable psychological impact on the civilian population; within a week Mussolini was replaced by Badoglio. As Morgan puts it in The Fall of Mussolini "It would be pushing things too far to say that Allied bombing [of all Italian targets, not just Rome] was responsible for the downfall of Mussolini in July 1943. But the bombings, together with the food situation, certainly caused a widespread loss of confidence in Mussolini and the Fascist regime and turned many Italians against the war."