The visitors started the game brightly, taking a deserved lead after just six minutes when Junior Stanislas found Joshua King from the left, leaving the Norwegian to finish past Lukasz Fabianski from close range.
© Getty Images
Adam Federici produced two saves to deny Wayne Routledge and Eder from finding an immediate equaliser for the hosts, before Simon Francis had a goal disallowed for offside at the other end of the pitch.
The hosts were awarded a penalty by referee Andre Marriner as Francis brought down Ayew in the box. Shelvey took the spot kick, and fired past Federici to complete the comeback on 39 minutes.
Garry Monk's side went on to dominate the final few minutes of the match, as Shelvey saw an effort get blocked, while the England international fired high and wide moments later with a decent opportunity.