The banana was thrown from the stands as the Brazilian was preparing to take a corner in the 75th minute, at which point Barca were trailing 2-1 and in the middle of a comeback from 2-0 down.
Noticing the banana on the pitch, the 30-year-old strode over to pick it up, take a bite, and then toss it aside before taking the corner.
"I've lived in Spain for 11 years," Sport.es quoted Alves as saying after the match. "You just have to laugh at these r****ds."
Alves previously called for "drastic measures" to be taken to tackle racism in Spanish football after being subjected to monkey chants during the first leg of the Copa del Rey semi-finals against Real Madrid last year.