You Can Leave Your Hat On was written by Randy Newman and appeared on his 1972 album Sail Away. It was made famous by Joe Cocker when featured in the 1986 Adrian Lyne film 9½ Weeks during the famous striptease scene. It first appeared on his album from that year titled Cocker.
In the lyrics, the singer is addressing a sexual partner as he/she disrobes as a prelude to a sexual encounter, perhaps in a striptease…
Baby take off your coat
Take off your shoes
I'll take off your shoes