Actually, it's most like not racist related at all. Brazil is actually a banana republic, which is a political term. Hence the banana symbol being used. Brazil should not be allowed to host the World Cup for this very reason. It's unstable, unsafe and a criminal capital of the world.
Why do I say that, you ask?
Well, if the thrower meant to insinuate that Dani Alves is (like) an ape then it's still not racism. Apes are fine creatures with immense physichal strength and agility. If anything it's a complement, not an insult. In other words, the banana thrower is an idiot, dealing complements as insults.
Alternatively, bananas are popular all over the world. It is one of the most consumed fruits by the human race. Throwing him a banana and him eating it could mean that the banana thrower wanted to find out whether Alves was a regular mortal who also fancies bananas.
The fact is ultimately that Alves got a free energy intake on the pitch, maybe it doesn't make a huge difference but it's certainly not a disadvantage.
PS. For it to be racism it have to involve thinking and expressing that all members of a race share the same traits which is either inferior or superior. Humans generally think we're smarter than all other races on the planet, so by definition we're all racists.