The big custodian failed to deal with a cross at the far post as he was challenged by Chris Hall and he could only help the ball into his own net.
Tranmere had put up tough resistance as manager Ronnie Moore went back to the club who sacked him at the start of last summer.
Oldham shaded the few chances which came in a tense game, but they needed Ward's help to secure their tenth home victory of the campaign.
Chris Porter headed over in the early stages, but Oldham had to wait until the 34th minute for their first real opening which stemmed from Chris Taylor's ball in from the left.
Porter was unmarked eight yards out and the 19-goal hitman shot straight at Ward.
Paul Warne blasted over the bar before Tranmere broke out and Chris Greenacre headed off target.
The teams cancelled each other out before Porter almost broke through on 57 minutes and was denied by a superb tackle from Tranmere's new signing John Thompson.
The next chance fell to Taylor after more good work by Porter, but he shot painfully wide at the far post.
A draw looked certain until Oldham began to exert strong pressure in the closing minutes.
They were denied a penalty for handball against Robbie Stockdale and were then denied by the woodwork as Hall ran on to Porter's pass and slammed his shot against the foot of the post from ten yards.
The winner arrived after 91 minutes as Porter crossed from the right and Ward fumbled with Hall jumping for a header.
Rovers could have equalised when John Mullin hit a fierce drive from the edge of the box which saw keeper Les Pogliacomi make a superb save.
The bad news for Oldham came moments before the final whistle as influential midfield man Richie Wellens was shown a straight red card for violent conduct following a flair-up on the halfway line.