Gomez beat new Macclesfield goalkeeper Joe Anyon from the spot in the seventh minute after pacy Latics winger Callum McManaman was brought down by replacement defender Thierry Audel.
Macclesfield had a penalty shout turned down in each half by referee Roger East in a battling performance which saw them unable to convert any of their chances against the Barclays Premier League side ranked 82 places above them.
Wigan gave a debut to on-loan Atletico Madrid goalkeeper Joel Robles for the match while Manchester United loanee Angelo Henriquez, who scored against Sunderland in last weekend's 3-2 defeat, started up front.
Macclesfield also handed a debut to their keeper Anyon, who had not trained with the Macclesfield defence after he joined them on an emergency loan from Shrewsbury yesterday after Lance Cronin suffered a broken hand.
It was Macclesfield's first time in the fourth round in their entire history, and what the Blue Square Bet Premier side lacked in invention they replaced with physicality in the early stages.
However, it was the pacier Premier League outfit who took an early lead following some clumsy defending by the home side.
Gomez passed the ball to McManaman as he raced down the left and looked to dink through the Macclesfield defence, only to be brought down by Audel for a penalty.
Gomez stepped up to take the resulting spot-kick and fired it just out of reach of new Macclesfield keeper Anyon, who got his fingertips to the ball with his first touch for his new club as it flew past his right side.
McManaman went close again for Wigan in the 23rd minute when Anyon punched Ronnie Stam's ball clear after Wigan stretched the home defence across the field, with the quick-footed winger firing a powerful follow-up shot just wide of the right post.
However, as Macclesfield began to settle into the game their confidence grew, with several breaks and shots making it unclear to the casual observer which side was the team in the top flight.
Matthew Barnes-Homer fired a warning shot for the home side after some good work by Jack Mackreth on the right wing resulted in a testing cross, but a lack of power on the shot allowed Robles to make his first save in English football a simple one.
Macclesfield's best chance of the first half came after Waide Fairhurst's penalty shout was waved away by the referee, with Audel almost atoning for his earlier error with a headed effort saved on the line from the resulting corner by John Paul Kissock.
Wigan almost doubled their lead straight from the kick-off when Nouha Dicko raced into the Macclesfield box, but Anyon made a terrific save to keep his team in the tie.
Macclesfield saw another real chance go begging minutes later when Keiran Murtagh was unable to beat Robles with a shot in front of goal after Wigan's Henriquez headed wide from a corner.
Wigan looked to have escaped a penalty against them after what appeared to be handball in the Macclesfield box from Ryan Jackson's cross, but again referee East waved the home side's shouts away.
Both sides looked pretty evenly matched as the second half progressed but Macclesfield still struggled to find the target, Fairhurst with another wasted chance when he blazed over with just under 20 minutes to go.
Macclesfield, who knocked out npower Championship leaders Cardiff in the previous round, kept up the pressure on Roberto Martinez's side, but a late corner by substitute Peter Winn did little to create any problems in the Wigan box as the clock ticked down.
The Silkmen then threw everyone forward with seconds left of normal time as Wigan put everyone but the keeper behind the wall due to wave after wave of attack from the home team.
However, there was not to be a shock for Macclesfield, who were the lowest-ranked team left in the competition ahead of this match, as Wigan held firm to keep their cup hopes alive.