Often people want to "give the impression" of a certain work without actually using it, usually because of royalties. Like, say, you're portraying an athletic training montage; you might want to reference "Gonna Fly Now" as used in Rocky. But if you don't want to pay for the actual licensing, you might want to use the same musical elements, so that the "sound" is recognizable while being musically distinct.
To do this, listen critically to the original and ask yourself what makes it unique. It's great to include technical analysis, like harmonic analysis, in this process, but start at an even more basic level. Many songs use IV, V, I, but what makes them recognizable is usually other factors. What is the instrumentation? How does it vary throughout the song? What range and tone characterize the prominent voices and instruments?
Imagine that you want to apply this process to write a fairy tale in the style of Little Red Riding Hood. You might not use a little girl in a red cloak, a wolf, and a basket of goodies. But you might say: The protagonist is a young girl, naive but confident. She is tasked with a short journey through a natural setting, unattended. She is warned of perils. She encounters a villain but doesn't recognize him as a threat. ... And so on.
Similarly, you could listen to "Gonna Fly Now" and say "It starts with just brass, in a fanfare-like rhythm, starting in unison but then rising to stack up a chord. After it builds to a half cadence, a tom fill introduces a disco beat. Brass, joined by strings, continue to dominate the texture. The harmony primarily alternates between two chords. The instrumental voices sustain a longer note on each chord change, but set up the next chord with a few short notes. After a few repetitions, vocals are added, though not prominent in the mix, providing only a few repeated lines of lyric, with an optimistic theme about personal improvement."