If the spell that targets Gossamer Phantasm has no other targets, it won't resolve (because it no longer has a legal target after Gossamer Phantasm has been sacrificed).

Artwork
Loading artwork…
Gossamer Phantasm
Time Spiral Remastered · #70 · EN
Nonfoil—Foil—
Card rules
Flying
When this creature becomes the target of a spell or ability, sacrifice it.
2/1
"Belief matters more than truth. Every moment, belief in imaginary things alters lives while truth sits unnoticed and waits." —Hakim, Loreweaver
Common · Illustrated by Jon Foster
Format legality
Commander Legal
Duel Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Pauper Legal
Pauper Commander Legal
PreDH Legal
Tlr Legal
Vintage Legal
Alchemy Not Legal
Brawl Not Legal
Competitive Brawl Not Legal
Future Not Legal
Gladiator Not Legal
Historic Not Legal
Old School Not Legal
Penny Not Legal
Pioneer Not Legal
Premodern Not Legal
Standard Not Legal
Standard Brawl Not Legal
Timeless Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
Gossamer Phantasm's triggered ability resolves before the spell that caused it to trigger. It resolves even if that spell is countered.