The Gunners survived a hugely contentious finale to beat West Ham 1-0, while Aston Villa were held 2-2 at Burnley.