Ramos got in trouble by issuing walks to Hernan Perez and Jordan Lennerton. Both scored on Avila's two-base hit.
Until the eighth, the game was even at 1-1, courtesy of a pair of solo home runs.
In the fourth inning, Miami went ahead, powered by Stanton's laser blast to left-center off Rick Porcello that clanked off the Marlins' building beyond the wall. The shot came on the slugger's 20th Grapefruit League at-bat.
"I let it go a little bit more today," Stanton said. "I was a little conservative the past couple of days. No real reason, just hitting line drives."
"His BP today was ridiculous," Marlins pitcher Tom Koehler said. "I was standing with [Brian] Bogusevic in left field after he hit like four off the center-field batters' eye, and one off that screen out there. Bogusevic turned around and said, 'He's feeling good today. Today is the day.' I like when he does that. Those are nice."
For a team looking for a boost offensively, Stanton's impact is uplifting in more ways than just delivering a run.
"The ball comes off his bat like no one I've ever seen," Koehler said. "So when he gets a hold of one like he did today, it just fires everyone up. We're all fans of the game. When you see someone do that to a baseball, it's almost like, 'Ohhh, you guys see that?' "
The Tigers pulled even at 1-1 in the seventh inning Tyler Collins' home run to right field off Mike Dunn.
In the mix for the fifth starter spot, Koehler certainly didn't hurt his chances with his impressive four shutout inning performance.
The lone hit Koehler allowed was a two-out, first-inning single to Miguel Cabrera. It was the lone base runner the right-hander allowed. He retired 10 straight to end his afternoon.
Koehler's command was strong, as he struck out four, and of his 47 pitches, 35 were strikes. Twice, he struck out Ian Kinsler.
Porcello averted serious trouble in his 3 1/3 innings. Along with giving up the Stanton home run, he allowed four hits and struck out three.
In the third inning, the Marlins had runners on first and second after Stanton's home run. But reliever Jhan Marinez escaped further trouble by getting Greg Dobbs to tap to second with two outs.
Carlos Marmol made his Grapefruit League debut in the sixth inning, and it was adventurous. The right-hander walked two and struck out two in a scoreless frame where he threw 32 pitches, with 16 strikes.
Up next: Because Jose Fernandez faced the Mets last Wednesday at Port St. Lucie, the Marlins on Monday will not send their ace out there again to face a division rival in back-to-back starts. So Fernandez will throw a simulated game of about 60-65 pitches in Jupiter in the morning. Lefty Brad Hand will get the starting nod at Port St. Lucie. Hand, who is out of options, is competing for either a rotation or bullpen spot.