Late goals from Matt Day and Yemi Odubade brought Oxford United a welcome three points at Moss Lane after a run of three successive draws.
Paul Shaw had notched his first goal for the club in the first half, and that should have been enough to make it a comfortable afternoon for Jim Smith's men.
But they again threw away the lead when they allowed Jake Sedgemore to level 13 minutes from time.
However, Day came in on the blind side to meet a left-footed cross from Alex Jeannin to head past keeper Stuart Coburn.
Altrincham then had centre half Karl Muroe sent off on 86 minutes for pulling back substitute Marvin Robinson when he was charging towards goal.
And Odubade ran through unopposed on goal and finished well to seal United's second away win of the season.
Jim Smith played a 3-4-1-2 formation for the first time, deploying Paul Shaw just behind Rob Duffy and Yemi Odubade.
In defence there was arecall for Arthur Gnohere, and with Eddie Anaclet injured and rested, Matt Day switched to a defensive right midfield role.
It meant a two in central midfield, instead of the three there's been before, but Eddie Hutchinson's return added strength to that department.
The U's spent the first few minutes camped in Alty's half and had strong shouts of a penalty when Alex Jeannin was brought down by Chris Lane on the very edge of the area. It looked as though the foul may have been inside, buyt the ref pointed to a free-kick a foot outside the box, and the free-kick came to nothing when Phil Trainer's cross went straight to keeper Stuart Coburn when he had seven teammates waiting for it.
When Altrincham then won a couple of corners in quick succession, Chris Tardif looked a bit nervy, unable to get much distance with one punched clearance.
United had a let-off in the 16th minute when Barry Quinn headed a Warren Peyton cross over Tardif and against the underside of his own crossbar.
Day delivered a good cross despite being under pressure, but Shaw couldn't get over it and directed it over the bar.
Duffy wasted the chance to send over a siimilar cross from the same position when he horribly sliced his centre.
However, the U's took the lead in the 38th minute with an excellent finish from new signing Shaw.
Yemi Odubade got into space on the left, turned back and crossed right-footed, and Shaw, 11 yards out headed over Coburn and into the right of the goal.
Odubade received a yellow card shortly before half-time for using his elbow as he jumped, which seemed slightly harsh as the Altrincham playuer who had blatantly body-checked him a minute earlier didn't even get a telling-off from the officials.
Gnohere added strength to United's back line, winning some important headers, and he was probably needed because Tardif continued to look uncomfortable with high balls.
Smith replaced Hutchinson with Carl Pettefer early in the second half, and Pettefer immediately looked better able to hold onto the ball.
Midway through the second half, the U's made a double substitution, taking off Rob Duffy and Shaw, both players having picked up knocks.
It became a more open game and Odubade seemed to have a decent shout for a poenalty when he appeared to be tripped by Jake Sedgemore, though there were few appeals from the visitors.
There were just 13 minutes to go when Altrincham equalised with what, from Oxford's point of view, was a poor goal to give away.
Substitute Carlos Logan got past Pettefer with ease and when his cross from the left was only half-cleared, Sedgemore fired home a 22-yard drive. Tardif got a hand to the shot but couldn't prevent it going in.
Logan continued to cause the U's problems, and he was allowed too much space as he advanced in central midfield and hit a strong shot, which Tardif got behind.
United's keeper then saved his team after some very sloppy defending let in Peyton, Tardif saving at his feet to prevent another goal.
But Day restored their lead and Odubade wrapped it up.
Oxford Utd: Tardif, Corcoran, Quinn, Gnohere, Day, Hutchinson (Pettefer), Trainer, Jeannin, Odubade, Shaw (Rose 66), Duffy (Robinson 65). Subs not used: Worrall, Standing.
Ref: Jock Waugh (S Yorkshire).
Att: 1,298
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules hereComments are closed on this article