The sound of the song was different from any previous Prince track, incorporating Middle Eastern finger cymbals, stringed instruments, and even a harmonica on the extended version. The song was also more in the pop vein than ever before, though the 12-inch single and video of the song feature a funky intro. Although the song was originally recorded in 1982, Prince drastically reworked it with The Revolution to give it more of an international sound. The string section was: Novi Novog on violin, Suzie Katayama and David Coleman on cello. Wendy & Lisa composed and conducted the strings on "Raspberry Beret" and provided backing vocals. The rest of the song was performed by Prince.
The song tells of a teenage romance and first sexual experience with a girl who wears the titular hat. The video for the song was Prince's first since his short-lived "ban" on music videos, and was directed primarily by himself, with animation created by Colossal Pictures co-founder Drew Takahashi. The song quickly became a fan favorite, and a staple in nearly every Prince tour. The extended version was included on Ultimate in 2006. While the song hit number 1 in Cash Box and reached number 2 on the Billboard Hot 100 in the US, only behind "A View to a Kill" by Duran Duran, it only reached number 25 on the UK Singles Chart.