With the Marlins trailing, 7-6, Allen delivered a bases-loaded double into center field that put Florida on top.
Kevin Hooper had two hits and scored twice and Brian Banks collected two hits for the Marlins, who erased a 7-0 deficit.
Florida scored six runs in the middle innings as a trio of relievers held the Cardinals scoreless over the final five frames.
Nate Bump pitched two innings, Michael Tejera tossed a scoreless eighth to notch the win and Juan Alvarez gave up a hit and a walk in the ninth before posting the save.
Mike Matheny went four for five with an RBI and So Taguchi homered for St. Louis.
Cardinals hurler Rick Ankiel's control problems continue to plague him. In an ineffective inning of relief, he issued three walks and hit a batter as Florida pushed across three runs without a hit.
2014: The Year in Music [PHOTOS]