Naylor rose highest to reach Jamie Clapham's free-kick in the dying seconds to deliver an explosive finish to a poor game. The match seemed to be ending as a draw after Devlin had scored within three minutes of coming off the bench in the 74th minute. Adam Tanner failed to clear after Richard Wright had produced a stunning save to deny Andy Campbell's close-range volley, and Devlin was on hand to prod the ball home.
A draw would have been harsh on George Burley's men, who took the lead for the first time four minutes into the second half. Bobby Petta fired in a speculative shot from 25 yards which deflected off his team-mate, Kieron Dyer, into the path of Samassi Abou, who calmly fired low past Alan Kelly for his first goal during his loan spell from West Ham.
Ipswich are second, eight points behind Sunderland.