The Spaniard's contract expires this summer and the 29-year-old will join the Black Cats as a free agent.
Gomez joined Wigan from Espanyol in 2009 after working with Latics boss Roberto Martinez on loan at Swansea.
He scored 11 goals last season, including penalties in the 2-1 FA Cup win at Manchester City and the semi-final defeat against Arsenal.
Sunderland have agreed to sign Wigan midfielder Jordi Gomez on a three-year contract from 1 July.