The Saints nearly pulled off a massive upset on Saturday, but the third-placed Magpies held them off in a fierce duel to win 4.12 (36) to 5.4 (34).
James celebrated her 19th birthday with a superb snap from an acute angle that bounced through, giving the Magpies the lead.
They held on grimly in a frantic last minute to register their fifth win of the season.
"I just threw it on the boot and watched it ... I was pretty lucky," James told Channel Seven after the match.
SAINTS v MAGPIES Full match coverage and stats
Trailing by six points at the last change, the Saints kicked two goals and took a seven-point lead.
Nicola Stevens should have sealed the win with three minutes remaining, but she missed on the run from point-black range.
That left the door open for the Magpies and set the scene for James' match-winner.
The Saints out-pressured Collingwood with 73 tackles to 60, but the Magpies had more poise and they held their nerve.
St Kilda's Hannah Stuart was best afield with 25 disposals and two goals, while their key-position player Kate Shierlaw kicked a goal in the last term and was mighty with her marking and pressure.
Collingwood's Jaimee Lambert gathered 21 disposals, while teammate Ruby Schleicher had 20.
Up next
St Kilda returns to RSEA Park next Friday night to take on Carlton, while Collingwood will look to consolidate a spot in the top four against the Giants in the late game at Victoria Park on Sunday.
ST KILDA 2.0 3.2 3.2 5.4 (34)
COLLINGWOOD 2.4 2.7 3.8 4.12 (36)
GOALS
St Kilda: Stuart 2, Stevens, Matin, Shierlaw
Collingwood: Lin, Brazill, Rowe, James
BEST
St Kilda: Stuart, Patrikios, Dillon, Xenos, McDonald, Stevens
Collingwood: Lambert, Schleicher, Cann, Brazill, Allen
INJURIES
St Kilda: Guttridge (foot)
Collingwood: Nil