When Australia lost their ninth wicket on the fifth and final day, they were 80 runs adrift of their victory target of 311 and all but out of the match.
But by lunch they were 291 for nine, just 20 runs away from a stunning upset with Brad Haddin 69 not out and James Pattinson unbeaten on 22.
However, the third over after lunch saw Haddin, on 71, eventually given out caught behind by opposing wicketkeeper Matt Prior off man-of-the-match Anderson's full-length delivery
But third umpire Marais Erasmus, using Hot Spot technology, overturned the call and that meant Ashes-holders England had gone 1-0 up in this five-match series ahead of the second Test at Lord's on Thursday.
Also Read
Pattinson finished on 25 not out after a last-wicket stand of 65.
It was the second remarkable last-wicket Australia stand of the match after their first innings 163, a tenth wicket Test record featuring teenage debutant Ashton Agar's 98 -- the highest score by a Test No 11.
All was going well for England earlier Sunday when a sensational new ball saw Anderson take three wickets for six runs as Agar (14), Mitchell Starc (one) and Peter Siddle (11) were all caught by England captain Alastair Cook at first slip to leave Australia nine down.