Fremantle came from a game-high 22 points down halfway through the last term, kicking three consecutive goals to bring the margin back to two points when Eagle Matt Rosa was penalised for deliberate out of bounds in the dying seconds.
Ballantyne kicked from outside 50m on the boundary and his shot looked like sailing through for a goal before hitting the post, with West Coast surviving to win 8.17 (65) to 9.10 (64) in a dour but memorable Derby.
Ruckman Dean Cox, who had 42 hit-outs and 22 possessions, was awarded the Ross Glendinning Medal for his standout performance, with Luke Shuey (26 possessions, 16 contested) and Beau Waters (23 possessions and nine marks) also influential for the winners.
The important win keeps West Coast's top four chances alive, with the team winning eight of its last 10 matches in an incredible revival after last year's wooden spoon finish.
Fremantle was playing to ignite its own top-four charge after three consecutive wins, but Mark Harvey's team appeared dead in the water halfway through the last term with ruckman Jon Griffin subbed out with a suspected hip injury.
The unexpected comeback started with Stephen Hill's goal 18 minutes into the final term, with Chris Mayne running from 50m out to the goalsquare to kick another three minutes later.
Nat Fyfe kicked the goal that drew Fremantle within three points after West Coast captain Darren Glass gave away a 50m penalty on the wing.
Michael Barlow played the best of his three games since returning from a broken leg, winning an equal game-high 26 possessions, including 14 contested.
Greg Broughton (26 possessions) continues to flourish in a midfield role, while, Ryan Crowley revived his best form as a stopper, keeping key Eagles midfielder Matt Priddis to 13 possessions.
Alex Silvagni spent the majority of the match on West Coast forward Josh Kennedy and after an impressive start conceded three goals.
What it means
This crucial win opens up a two-game buffer between the fifth-placed West Coast and Fremantle, who slip to seventh, half a game ahead of St Kilda and Essendon. So high were the stakes on Sunday, the winner was always going to become a top-four chance, while the loser would have its place in the top eight under threat. The upside for Fremantle remains significant, however, with key players Aaron Sandilands and David Mundy pushing to return. They will both need to have an impact in the run home to secure a finals berth for Fremantle.
Influential players
Luke Shuey was the pick of West Coast's midfielders, winning 16 of his 26 possessions in contests and finishing with eight clearances and eight inside 50s (both game-highs). Beau Waters lifted his teammates with repeated courageous acts, while Dean Cox continued a brilliant season that will be rewarded with All Australian selection.
Full-back Darren Glass, who is also mounting a strong case for All Australian honours, kept Fremantle forward Chris Mayne to one goal and six disposals.
Michael Barlow played just his second full game this season after winning 11 possessions in a quarter last week against the Sydney Swans. On Sunday he started in equally prolific form, racking up nine possessions in the first quarter and finishing with 26. Greg Broughton continues to play an important midfield role in David Mundy's absence.
There was a host of impressive defensive jobs for Fremantle, with Tendai Mzungu out-pointing Andrew Embley, Ryan Crowley beating Priddis and Antoni Grover having the better of Quinten Lynch.
Key match-up
Alex Silvagni seemed a surprise match-up for star Eagle Josh Kennedy, given Luke McPharlin's form on the competition's best forwards this season. The Freo youngster was important early however, winning a series of one-on-one aerial contests and limiting Kennedy to one goal and seven possessions at half-time. But Kennedy rebounded in the second half, kicking two more goals and finishing with 10 marks (including five contested) to play a crucial hand in the Eagles' win.
Magic moment
Few sights would please Fremantle supporters more than that of Stephen Hill streaming inside 50 to kick a running goal. When the run starts at half-back, includes three bounces, and is set up with a perfectly weighted Michael Barlow handball, well that's a bonus. Hill's goal six minutes into the first term was the most dazzling play of the day, but will probably be forgotten in the wash up after a hectic finish.
Stats that mattered
While West Coast's wastefulness in front of goal surely played a part in keeping this match close, Fremantle's defiance at stoppages was another reason it went down to the wire. The Eagles dominated the hit-outs to half-time (23-10) and at full-time (53-18), but Fremantle won the clearances 36-35, with Broughton and Matthew Pavlich (five each) and Barlow (four) leading the way. Had the Eagles capitalised on their hit-out advantage, it would have been a different game.
Fremantle 2.3 3.6 6.7 9.10 (64)
West Coast 1.6 3.7 6.14 8.17 (65)
GOALS
Fremantle: Hill 2, Clarke 2, Barlow, Ballantyne, McPhee, Mayne, Fyfe
West Coast: Kennedy 3, LeCras 2, Shuey, Priddis, Darling
BEST
Fremantle: Broughton, Barlow, Mzungu, McPharlin, Crowley, Grover
West Coast: Shuey, Cox, Waters, Kennedy, Glass, Rosa
INJURIES
Fremantle: Jonathon Griffin (hip)
West Coast: Nil
SUBSTITUTIONS
Fremantle: Jonathon Griffin replaced by Paul Duffield in the third quarter
West Coast: Jack Darling replaced by Patrick McGinnity in the third quarter
Reports: Nil
Umpires: Margetts, Schmitt, Ryan
Official crowd: 41,055 at Patersons Stadium
THE NEXT FOUR
Fremantle: The next four weeks is far from easy now for Fremantle and will shape whether or not they play finals for the second straight year. It begins next Saturday night against Hawthorn (Patersons) followed by St Kilda (Etihad), Carlton (Patersons) and North Melbourne (Etihad).
West Coast: The Eagles can make a real charge at the top four over the month up against Western Bulldogs (Etihad), Richmond (Patersons), Melbourne (Etihad) and Essendon (Patersons).
DREAM TEAM HIGHLIGHTS
Fremantle: Michael Barlow ($456,200) led the way in the Toyota AFL Dream Team scores for Fremantle with 98 points. Greg Broughton ($398,800) had 96, Nat Fyfe ($369,000) 93, Luke McPharlin ($226,800) 90 and Zac Clarke ($218,500) 90.
West Coast: Ross Glendinning Medallist Dean Cox ($381,700) had 137 points for the Eagles and Mark LeCras ($323,500) 118.
QUARTER BY QUARTER
First quarter
Fremantle got the bright start with Stephen Hill going on a three-bounce run through the middle of the ground to coolly finish from about 40 metres for the first goal of the game.
Michael Barlow then marked strongly to goal as well, but the Eagles worked their way back into the contest. Inaccurate kicking plagued them, but eventually Jack Darling kicked truly and Fremantle led by just three points at quarter-time.
Second quarter
West Coast worked its way on top for much of the second quarter and got quick goals to Matt Priddis and Josh Kennedy, but Fremantle locked things back down from time-on onwards to close to within a point by half-time after Zac Clarke's second career goal.
Third quarter
It was goal for goal again for much of the third quarter and Fremantle went a goal ahead when Clarke received a lucky 50-metre penalty to boot his second as his importance on the contest grew after fellow ruckman Jonathon Griffin was subbed out injured.
The Eagles, though, got the last two goals of the quarter through Mark LeCras and Josh Kennedy.
Fourth quarter
Kennedy's third early in the last quarter had West Coast out to a game-high advantage of 14 points.
The Eagles' inaccurate kicking kept Fremantle in the contest, though, as West Coast missed more chances to close it out moving to a 16-point lead but a strong mark and goal from the goal square to Luke Shuey seemed to seal the win.
Fremantle wouldn't go away, though, and they got within three points after goals to Chris Mayne, Stephen Hill and Nat Fyfe. The finished then turned amazing when umpire Dean Margetts penalised Matt Rosa for deliberate out of bounds as he punched the ball out right on the siren.
Hayden Ballantyne took the free-kick from just outside 50 and hit the post to hand the Eagles a one-point win.