Well, this thread was inevitable. lol
Honestly, without any bias, and purely from a standpoint of a person who loves film, X-Men wins. DOFP had way more gravitas with a cerebral plot, incredible performances, and overall emotional impact. Avengers was just a pure action/comic book film that also had great acting and character development. At the end of the day however, Avengers was a bit of a mindless, special effects heavy, summer blockbuster.
What I will say about Avengers is it was able to develop ALL its main characters and give them depth. Although DOFP did this with Logan/Xavier/Magneto/Mystique, and delivered solid characters in the form of Trask, Quicksilver, Beast and Kitty, it failed to really develop a majority of its crowded roster. They served their purpose though, as power pieces to show the struggle.
But overall, DOFP is superior as a film to Avengers.
In general, I think both X-Men and Batman will always stand out in the comic book film genre because they have more weight in the form of themes and seriousness. Just my opinion though.