Discussion of the Hulk in the film The Avengers:
The way I interpreted it was that when Banner was induced to become the Hulk on the helicarrier by Loki's staff, it was an external force influencing him. The staff is shown to have that power during the film, this seemed to be a weaker form of it, as it was causing everyone in the group to become more aggressive. The cinematography shows this, and Stark visibly shakes off the staff's effects near the end of the argument.
Later on in the film:
Banner purposefully transforms into the Hulk. During this episode, he is clearly in partial control. He actively chooses to attack the Chitauri, but still has some issues preventing his anger at Thor from coming out. However, he doesn't attack any civilians, and he attacks Loki especially brutally, indicating that he understands how much of a threat Loki is.
As I discuss in this answer, the ending of The Incredible Hulk
indicates that Banner is no longer actively trying to suppress the Hulk all the time. Instead he's periodically embracing the Hulk. The climactic battle of the film has Banner use the Hulk as a weapon against the Abomination. During that battle, Hulk, just like in The Avengers, only attacks his enemy, and doesn't wildly attack everyone in the vicinity. This suggests that this film may have been the start of Banner having some control over the Hulk during voluntarily induced Hulk episodes.
This is also backed up by Joss Whedon's Director commentary on the home release of Avengers. During the scene where Tony, Bruce, and Steve are discussing Nick Fury's suspicious behavior, he says:
[Tony] allows Bruce, he sets him up, and lets him get to that place where he can decide to be the Hulk. And you have two different Hulks in this movie, you have the one he becomes unwittingly and the one he decides to be, and the difference is palpable.