Consul General Guido de Sanctis was pulling out of the garage at the consulate Saturday when the gunmen pulled up and fired at the vehicle, CNN reported.
Libyan police arrived immediately at the scene, de Sanctis said. The identities of the gunmen are unknown.
"It is difficult to make conclusions ... but if you look at the past months, some people are trying to send all the foreigners away," de Sanctis said. "The British, the Red Cross and unfortunately the Americans -- now us? I was not sure we were on the list. I did not expect it at all."
Italy's Foreign Minister Giulio Terzi on Sunday called the attack "a vile act of terrorism," and said it was "an attempt to destabilize the institutions of the new Libya."
The attack came amid the ongoing investigation into the Sept. 11 assault on the U.S. consulate in Benghazi that killed four Americans, including Ambassador Christopher Stevens.
De Sanctis said security at the Italian consulate was enhanced following the attack at the U.S. consulate, but the building is not heavily fortified and is relatively open to the public.
Pregnant Mila Kunis wins 'Best Villain' at MTV Movie Awards
Biologists detail four new deep-sea 'killer sponges'