Cristina Fernández de Kirchner was greeting supporters outside her home when a man emerged from the crowd and pointed a handgun in her face.
Ms Fernández de Kirchner is involved in a corruption trial and was returning from court. She denies the charges.
Police said the gunman, who local media identified as a 35-year-old Brazilian man, has been taken into custody. They are attempting to establish a motive for the attack.
Addressing the nation late on Thursday night, President Fernández said: “Cristina remains alive because for a reason not yet technically confirmed, the gun, which contained five bullets, did not fire.”
He went on to condemn the attacker and said the attempt on Ms Fernández de Kirchner’s life was one of the “most serious” incidents since the country returned to democracy in 1983.
“We can disagree, we can have deep disagreements, but hate speech cannot take place because it breeds violence and there is no chance of violence coexisting with democracy,” President Fernández said.
He also declared a national holiday on Friday to allow Argentines time to “express themselves in defence of life, democracy and in solidarity with our vice president”.