The barriers were erected near the cash point of the branch on Calle Duque de Alba in central Madrid, a popular sleeping area for some of the city's homeless.
But critics of the move have reacted angrily, starting a petition on Change.org that has already amassed over 60,000 signatures.
Addressed to Madrid's City Hall, the petition calls for Bankia to remove the metal bars.
"The measure is completely inhumane," Tiago de Olivera, who started the petition, wrote on Change.org
"This space is used as a shelter by the poor and homeless who deserve to be treated with dignity and respect, especially now when temperatures are extremely low at night," he added.
Olivera called on people to support his petition, arguing solidarity was more important than exclusion, while also having a go at Bankia, which in 2012 received a €20 billion bailout from the Spanish state after its near collapse.
"Sign this petition to tell Bankia that examples of social exclusion, such as homelessness, are not fixed with bars, but with solidarity - just as Spanish citizens showed 'solidarity' by injecting €20 billion [into Bankia]."
Bankia, speaking to the Spanish Huffington Post, said that the measure was "totally isolated" and was a response to complaints from clients.
"We don't have a problem with people who sleep here overnight, but people were also here during the day preventing the proper operation of the branch. It sounds bad, but we had to find a solution," a Bankia spokesman said.
Critics have been reacting angrily on social media.
Esto es un cajero de Bankia en Madrid, con pivotes anti-mendigos. Recuerdo: Bankia fue rescatada con nuestro dinero. pic.twitter.com/fYIX0YzGn5- Alberto Garzón (@agarzon) March 21, 2016
Spanish MP Alberto Garzón, member of the United Left party, wrote: "This is a Bankia cash machine in Madrid, with anti-beggar bars. Remember: Bankia was rescued with our money."