"to dance to popular music with a strong beat," 1948 (first attested in song title "We're gonna rock"), from
rock (v.1), in earlier blues slang sense of "to cause to move with musical rhythm" (1922); often used at first with sexual overtones (cf. 1922 song title "My Man Rocks Me (with One Steady Roll)"). Sense developed early 1950s to "play or dance to rock and roll music." Noun sense of "musical rhythm characterized by a strong beat" is from 1946, in blues slang.
Rocksteady, Jamaican pop music style (precursor of reggae), is attested from 1969.