The incident occurred at 11:40 a.m. local time while Prime Minister-designate Enrico Letta's Cabinet was being sworn in less than a mile away at the presidential palace, ANSA reported.
Authorities arrested Luigi Preiti, 46, for allegedly shooting at police six times. They said he was also shot and was in unstable condition.
"Please loosen my handcuffs, I cannot feel my arm," he allegedly told police as they wrestled him to the ground and arrested him.
Police described Preiti as "calm and lucid" but said he suffered from mental illness. Preiti's brother, whose name was not reported, said "he is not unstable and has never suffered from mental illness."
"We are shocked, we cannot explain how this could happen," the brother said.
The two injured officers were in stable condition and being treated at a hospital in Rome after one was shot in the neck and the other in the leg, ANSA said.
The officers were identified as Guiseppe Giangrande, 50, and Francesco Negri, 30.
A pregnant female passer-by was also mildly injured when she was grazed by a bullet. She was being treated in a Rome hospital, the news service said.
The cause of the gunfight was not reported.
Senate Democrats to pull all-nighter on climate change
Dennis Rodman pledges to end trips to North Korea