Forest had arrived at the DW on top of the Championship with 10 points from a possible 12 but they were second best for the first half, when all the goals were scored.
Forest took the lead in the eighth minute when Andy Reid curled a lovely free-kick past Scott Carson.
Wigan were level six minutes later through Shaun Maloney's penalty, after Marc-Antoine Fortune was brought down by Jack Hobbs.
And they scored what proved to be the winner in the 35th minute when Marc-Antoine Fortune's shot was tipped on to the bar, allowing Gomez to tap home.
After four games without a win, Owen Coyle had made a raft of changes to his starting line-up.
Roger Espinoza and Gomez, so influential in turning round last weekend's clash with Middlesbrough, were given their chance, and they picked up where they left off.
Despite dominating the opening exchanges, however, Wigan fell behind to Forest's first attack.
Referee Craig Pawson awarded them a free-kick on the edge of the area after Leon Barnett fouled Henri Lansbury.
And Reid stepped up to curl a beauty past Carson, in off the near post.
Wigan did not let it get to them, and Maloney was only inches away from getting a toe to Jean Beausejour's cross before they got back on level terms after 14 minutes.
Fortune was tripped inside the area by Hobbs, and Maloney stepped up to make it 1-1.
The home defence held firm to clear a couple of dangerous set-pieces by Reid, before Wigan took the lead after 35 minutes.
Fortune was the architect with a fantastic effort from 25 yards that was tipped on to the bar by Karl Darlow.
Unfortunately for the goalkeeper, Gomez was first to the rebound and he tucked it away from a tight angle.
Greg Halford saw a shot cleared by Emmerson Boyce as half-time approached, but Wigan were full value for their interval lead.
The second half, however, was a different story.
Right from the off, Forest gradually took control and restricted Wigan to counter-attacks.
Reid saw a couple of headers threaten the Wigan goal, the first one a shade too high and the second bringing a decent save from Carson.
The visitors were claiming a penalty on the hour when Chris Cohen went to ground after a tangle with Espinoza, but the official remained unmoved.
The last half hour was played out almost exclusively in the Wigan half, although Forest could not quite find that key to unlock a determined home rearguard.
And they nearly conceded a third in added time when James McCarthy broke down the left, but his ball across was behind substitute James McClean and the chance had gone.