The home side had led through Grant Holt’s early penalty, but found themselves trailing when George Friend equalised before half-time, with Grant Leadbitter putting the Teessiders ahead inside the final quarter.
Gomez, though, ensured a share of the spoils when he drilled home a brilliant free-kick five minutes from time.
Having made three changes to the side that drew 2-2 with Doncaster in midweek, Wigan came flying out of the blocks in search of the opening goal.
They had strong claims for a penalty waved away by referee David Coote when Friend appeared to nudge Marc-Antoine Fortune in the back as he shaped to shoot.
But Boro could have no complaints on the 16-minute mark when Coote did point to the spot, with the same two players involved.
This time Friend clearly had a handful of Fortune’s shirt, and Holt made no mistake from the resulting penalty.
The home side were claiming again moments later when Holt went down in the box after getting the wrong side of Jonathan Woodgate, but this time the official said no.
Boro were looking dangerous on the break, Lukas Jutkiewicz twice forcing very good saves from Scott Carson with left-foot strikes.
And Albert Adomah, a summer target for Latics, was looking lively every time he got the ball down the right wing for Boro.
Carson was again called into the action to deny Mustapha Carayol with his legs, but Boro would find an equaliser a minute before half-time.
Friend made amends for conceding the Wigan penalty, getting the better of James McArthur down the left and cutting into the area.
Despite being fouled by the Scot, Friend stayed on his feet and was rewarded when his low shot flew past Carson and into the far corner of the net.
The half-time break saw the victorious Wigan Warriors rugby league side parade the Challenge Cup, with the FA Cup won by the football team last May also on show.
But when the action resumed it was Boro who remained on the front foot.
After Luke Steele saved well from James McCarthy, Boro pushed forward and almost took the lead when Adomah cut inside Stephen Crainey only to see his shot saved by the legs of Carson.
But the visitors were asking the more probing questions by this point, and Adomah’s 74th-minute cross was neatly finished off by Leadbitter to the delight of the travelling fans behind the goal.
Wigan, however, never gave up the ghost despite being below-par across the board.
They hauled themselves level with five minutes left when Roger Espinoza was fouled on the edge of the area, Gomez stepping up to rifle home the leveller with a cracking set-piece.
Marvin Emnes saw a late shot touched round the post by Carson, and then fired into the side-netting in stoppage time, but the honours were shared.