So Eywa is a planetary brain made out of all the trees of the world. That is quite amazing, true, but not divine. However, Eywa liked being worshiped as a goddess for some reason, and chose to use her control of the world's more primitive animals to keep the Na'vi locked in scientific and technological stasis so that they would never advance enough in science to study her true nature and blow the whole thing. After all, when she provides them what they need, why would they advance? However, her plans hit a snag when humans came to Pandora. Now here was a sentient species with technology to reach the stars, and the science to figure out what she really is. These people obviously have to be gotten rid of before they could spill the big secret to the Na'vi. However, she has to do it in such a way that no curious Na'vi would ever consider talking to or learning from the humans should they return, ruling out a simple massive Zerg Rush of wildlife (which would also risk the humans attacking from orbit). She finds out that they are here for the Unobtanium, which is the perfect source for the conflict she needs.
So Eywa, in her role as the Na'vi goddess, tells her people to be as uncooperative as possible. She has them spurn all offers of technology or science, and utterly ignore the rather desperate need the humans have for the stuff that they're sitting on. As per her orders, some engage in low-level guerrilla warfare (such as the arrows on the truck tires) and they expel the school from their village, raising tension. When Jake Sully arrive on the planet and becomes an Avatar, she senses in him someone rather bitter at humanity and a fascination for the lushness of Pandora. She decides that these things would make him valuable as a pawn, which is why she calls off Neytiri from killing him and orders him let into the Hometree. She has him bond with the animals of Pandora (perhaps subtly messing with his brain via her control of them) until he comes to feel more Na'vi than human. This has the double effect of distracting him from his diplomatic mission, because she needs atrocities in order to be sure that the Na'vi remain anti-human and anti-science.
She allows the subsequent destruction of the Hometree in order to further galvanize the anti-human sentiments of both her pawn Jake and the Na'vi. The naive chumps proceed to make it even easier for her by bringing her Dr. Grace to heal. Grace is the top scientist on the planet and one of the most likely people to reveal her secret, which would cause her whole charade to crumble. Perfect! As a bonus, she was shot by a human, meaning that Jake's anti-human sentiments will be raised even further. Dr. Grace took wounds in the chest, which really shouldn't affect her mind. But they do give Eywa the perfect excuse after she absorbs the poor woman's mind. "Her wounds were too great", likely story. She was still alive, and her mind was intact. There was nothing stopping the transfer except for the fact that she would be far more useful to Eywa dead than alive. Also, to be sure that Jake further mystifies her, she has Grace's hollow shell say "I'm with her, Jake. She's real." That would prove very little challenge a planetary brain that can control thousands of animals at once.
Then, in order to ensure that all the tribes of Na'vi remember the humans only as bringers of death, she gives Jake the Toruk to gain power over them. He leads them into battle, where the humans' superior technology easily slaughters them. She wants this. She needed plenty of death, to get the Na'vi to hate and distrust humans forever after. After she has judged the slaughter to be sufficient, she commands her mindless herd of slave-beasts to charge and overwhelm the humans, which she could have done at any time. Following that, she has the Na'vi "escort" the humans offworld. Note her insidious effect on her pawn Jake Sully, by this point he refers to his own species (including his own family and friends) as "aliens". Then she transfers Jake Sully's mind to his avatar form permanently (probably performing any remaining necessary mind rearranging as well).
The plan worked like a charm. The humans are gone, the Na'vi are lead by a firmly anti-human leader, that leader deifies her, the Navi are embittered towards the humans, and there is no more risk of the Navi realizing that they've been played for fools. That's right, the true villain won. You just didn't see it.