Phil Jagielka's header proved crucial as Everton edged out valiant Wigan 2-1 at a rain-drenched Goodison Park.