Jose Baxter's early goal was enough to sink rock-bottom Pompey, who had Sam Sodje sent off for violent conduct just after half-time.
The Latics warmed up for Tuesday night's FA Cup fifth-round replay at Everton with their third straight league win since parting company with manager Paul Dickov.
Baxter's 11th-minute strike, which beat Portsmouth goalkeeper Simon Eastwood from 25 yards out, lifted Oldham further away from the League One drop zone.
Gerrard, assistant to caretaker boss Tony Philliskirk, said: "It was a scrappy game but a good result. We kept telling the players they shouldn't underestimate Portsmouth because this was a massive test, so their response was good.
"When you win a couple of games there can be a tendency for unprofessionalism to creep in, but they got the job done.
"We had chances to score a couple more and our defending was excellent when it needed to be.
"In our league position, and in our predicament, it's points that matter more than performances. We weren't at our best, but we are going into games with a bit of confidence.
"It's Everton next and we can go there and believe in our chances of getting a result. Obviously they are big favourites at home, but stranger things have happened."