There's no question that 2007 was filled with dramatic highs and lows for Amy Winehouse.

And there's no question that, in addition to the song's undeniable musical appeal, her hit "Rehab" — which is one of the five nominees for the Record of the Year Grammy Award — was driven by its relevance to the singer's real-life troubles: Winehouse herself is in a rehab facility in England at press time, following the widespread circulation of an online video in which the singer is seen smoking from what appears to be a crack pipe. The singer's scheduled appearance at the awards on Sunday — she's nominated for six Grammys, also including Album of the Year, Song of the Year and Best New Artist — remains in question.

Yet despite its resonance to both Winehouse's life and today's culture, the song was born from a casual comment and was written in a matter of hours.

Mark Ronson, who produced "Rehab" for Winehouse's Back to Black LP, recently recalled working on the track, and said the tune started off as a complaint, spawned by a conversation during a break from recording sessions.

The two were working at his studio and decided to take a quick stroll around the neighborhood, during which Winehouse started telling Ronson about some of her personal problems.

"Amy came into my studio in New York one day, and we really hit it off and got some ideas going pretty quick, so she stayed in New York for two weeks to work," he recalled. "Most of the time, she was coming in and writing songs on the guitar, and we decided we wanted to go for this '60s soul/girl-group sound that we both loved, and we started making her songs fit with that.

"We were walking down the street," he continued, "and she's telling me a story about her family or something coming over to [her home], to kind of talk some sense into her. And she was like, 'They tried to make me go to rehab, and I told them no, no, no,' and she put her hand up.

"I guess, as a friend, I should have been like, 'Oh my God, that must have been hard for you.' But as a producer, I was just like, 'That sounds hooky — you should go back to the studio and we should turn that into a song.'"

As soon as they were back in the studio, Ronson said Winehouse came up with the hook, "but it started out as a slow blues shuffle — it was like a 12-bar blues progression, and I said, 'I think it would be fun for the verse to put in those like Beatles-esque E-minor, A-minor chords, which would give it that jangly feeling. So she did."

Winehouse, Ronson said, wasn't accustomed to writing songs in this manner, as most of what she did was based around jazz chords. "She wrote it so quick, in like three hours, and we worked on it a bit," Ronson said.

Not long after, Winehouse and Ronson called on the Dap Kings, the Brooklyn, New York-based band whose vintage-R&B-worshipping sound gives the record its '60s soul flavor.

"Amy and I were in my studio, and I'm playing all the instruments and using every digital trick in the book to make the song sound old, and I remembered hearing the Dap Kings record the day before," the producer recalled. "I played it for Amy and said, 'We should just get these guys to play the sh--, it'll be great.' She said, 'Sounds good to me,' and we went in and did it with them." The group ended up performing on all six Ronson-produced songs on the album.

Winehouse and Ronson dug the song, but the reaction from the singer's British label took the producer by surprise. "I played it for her A&R guy a week later, and he came to New York to check up on us — to see how much of his money we were wasting," he recalled with a laugh. "And I'll tell you, English A&R guys are a bit more excitable than American A&R guys. We played the record for him, and in the first 15 seconds, he was like, 'Rewind that! Rewind that! That sh--'s amazing!' I didn't think it was a bad song and I enjoyed what we were working on — but I'd never made a hit record before, so I didn't know that was something I might actually be capable of."

Ronson figured the song's old-school sound automatically ruled out its commercial possibilities in the U.S. "I mean, it just doesn't sound like anything else out there, and I couldn't imagine why that it would be a hit on the radio," he said, adding, "I'm not surprised that Amy took off, because I can see it from a completely subjective view. If I had nothing to do with it, and saw Amy sing, I could understand why it would be big in England. I was surprised, but in a proud way, when it started blowing up in England, but when it started to come back here and started to make some noise in America, I was shocked."

Apparently the shock has worn off, since Ronson said he believes the song is a strong contender to win the Record of the Year Grammy, where it's up against Beyoncé's "Irreplaceable," the Foo Fighters' "The Pretender," Rihanna's "Umbrella" and Justin Timberlake's "What Goes Around ... Comes Around." (Look for stories on all of those songs appearing here in MTV News throughout the week.)

"When you look at that list, and think about what songs might be on the radio in 20 years from now, for better or worse, its probably going to be 'Rehab' and 'Umbrella,' " he said. "I think Amy deserves to win, but it's always hard to tell. You can't listen to that song and think anything else but she owns it and no one else could have sung that. It's her voice and her lyrics that make that record. Listening to that song now, you can't imagine anyone else singing it — it's just her song.

"It's basically the theme song of modern-day celebrity trash culture," he reflected. "Amy wasn't trying to be ironic, she just wrote it from a completely personal place. It very much feels like if there ever was a moment for the institution of rehab ... it's definitely been around these past two years, and as much as I think Perez Hilton and those things are complete and utter rubbish, and ruin the classic medium of reporting, I understand the controversy did help this record in some sort of way."

Don't sleep until February 10 — geek out on the Grammys with MTV News' complete coverage right here!