I'll stick to Australian games since I've seen a lot more of them.
There are so many great tests to choose from. The one run West Indies win, Dravid and Laxman's comeback to win the game from an impossible position, Langer and Gilchrist's partnership in Hobart, Lara's 153* to see the West Indies home by one wicket in 1999... and they are just the ones involving Australia in the last few years.
For ODIs, two world cup games (already mentioned by others
)spring to mind - the semi-final in 1996 between Australia and the West Indies where Australia recovered from 4/15 to make 207, and then the West Indies were left needing 40 odd off the last 10 overs with 8 wickets left and Warne pulled it out of the bag with 4/36 from his 9 overs. One of the all-time great one day bowling performances, supported by some great bowling from Fleming at the death as well.
The other is of course the 1999 semi-final between Australia and South Africa. After Australia made a modest 213 with Pollock and Donald bowling brilliantly, South Africa were cruising at a run a ball early on before Warne did the job again, taking 4/29 from his 10 and turning the game on its head. When Kallis fell after making a half-century with 39 needed to win and 6 down Kluesener put in a spectacular performance to score 31 of the last 38 runs in the innings off just 16 balls, and all of a sudden South Africa had come back into it after needing more than a run a ball to only need a handful off the last over. Then, with the scores level and three balls to go, Kluesener hit it straight to mid-on and Donald was run out in a mixup. Amazing finish to the best world cup I've seen, in what was the true final.
There are lots more of course, but I'll remember them forever, not only because the finishes were so good, but because of the importance of the games.