Wrexham ended a run of four defeats on the trot to leave Oldham still looking over their shoulders near the foot of the second division table.
Latics manager Brian Talbot has predicted 52 points will be enough to stay up and victory over the Robins would have seen his team reach that target but they had to settle for a draw after going behind at Boundary Park.
Oldham had the first chance of a quite game as defender Daniel Hall, who had been brought in to replace Gareth Owen after his club failed to agree a fee with the on-loan Stoke City man, headed wide from close range.
But Wrexham went in front after 19 minutes following neat build-up play between striker Chris Llewellyn and returning skipper Darren Ferguson.
Ferguson played an angled pass into the penalty area and Hector Sam raced onto it to send his low shot inside the far post from 16 yards.
It was Sam's 11th goal of the season and his performance later won praise from manager Denis Smith.
Oldham went close to an equaliser after 23 minutes when Paul Murray's volley hit Michael Ingham's right-hand post.
Ingham then dived to deny David Eyres but was left stranded when he was beaten in first-half stoppage time.
Jermaine Johnson crossed from the left and right back Dean Holden appeared at the far post to steer in his finish from eight yards.
Oldham thought they were ahead less than two minutes after half time but Murray saw an offside flag raised after turning in a John Eyre cross-cum-shot.
Wrexham closed out the game and were only under pressure by a Hall shot that flew past the post and Holden's late effort.
Visiting boss Smith said: "I'm glad we ended our losing run. We will all sleep much better tonight."