Western Australia have survived a late South Australian charge to earn a dramatic six-run win and lock up a spot in this season's Marsh One-Day Cup final.