Arsenal ended Manchester United's 25-match unbeaten run in the Premier League and kept up their hopes of securing a place in the top four.