Crystal Palace were on top at Manchester City for the first half but surrendered a 2-0 lead to lose 4-2 in the Premier League.