Hard to say how it compares to the first one, as that one's old hat and this is still shiny new, but it easily beats the second. I actually liked it better than the Avengers movie, though that's not saying much seeing as how I walked out of that and wouldn't even consider a peepee pitstop for this one.
Regardless, I think this movie took each of those things that the Marvel movies have done best, and balanced them perfectly. The relationships, the humor, the over the top flash...it delivered each one in very, very calculated amounts. More importantly, it never let one really overpower the others for any given scene, until right at the end. In fact, the people involved (70% of California, according to the credits) seemed so cognizant of the importance of that mix that any time one threatened to become too much, the others were immediately called in to provide some relief or to maintain tone.
Thankfully, they also took the things that the Marvel movies have frequently been terrible at, and totally avoided being terrible at them. This might be the only one of the bunch besides Thor that perfectly matched its villain's scope, power, and danger level to its overall intentions. There weren't any of the problems that have plagued the conflict source of the previous movies. Most of those have typically suffered one of the following:
1. Anybody could beat this wet weeping pussy. See: the very silly treatment of the Red Skull.
2. "We'll try way too hard to sell this guy early on, fucking up the tone of the entire movie, and then not sell him at all for the rest of the film." Iron Man 2.
3. Look, just pretend that Loki doesn't come across like a really dramatic, underwashed cosplayer-slash-tentacle porn enthusiast. Avengers movie only.
4. Jeffery Lebowski in a tank with legs. Not actually a problem, now that I think of it. Not actually a problem at all.
Really, Marvel getting the villain right is like if Nolan stopped pile continuity errors on top of each other, or if the next Star Trek didn't play Spock off as a sulking and smarmy paperwork junky. It's literally taking the brand's biggest weakness and fixing it completely.
Are there still problems? Yeah, sure. There always are. And some of the ones here would really irritate me in a more serious film. But that's part of why that very controlled manipulation of tone is so valuable...a movie that opens with the I'm Blue song (I'm a beet on a diet? I've never actually bothered to find out) can get away with shit that something like Dark Knight Rises never could, if it can maintain that cheek while engaging you emotionally. And while Dark Knight Rises was 100% problem-free...
- Spoiler: show

...this one is way more successful at being what it's trying to be, which is great summer movie fun.
I've come to the conclusion that superhero movies would be very well served by redefining their ambitions and structure, and letting go of the need for a third act change of 'epicality.' Every damn time, that seems to be where they fuck it up. Finding a new way to engage the third act without losing the sense of a climax would save so many of the turkeys out there. But this one is different. The third act CGI jackoff-fest is totally not a problem, because it never let itself get so serious that the cornballer elements involved ruin it and it never got so silly that the tension is absent.
Pretty good start to the summer, I must say.