According to
http://www.word-detective.com/back-n.html,
"'Groovy,' for instance, has had at least three incarnations. First heard as a jazz musicians' term of approval in the 1950's, 'groovy' later became perhaps the most widely known, and parodied, exclamation of the hippie era, but fell into disuse after about 1970. Now it seems that 'groovy' has surfaced again in the lingo of youth, which is good news for those of us who forgot to stop saying it in 1970."
http://www.unm.edu/~dave/words/3-1.html dates it to the 1930s.
I associate "groovy" mostly with the 1960s, but "to groove" mostly with the 1970s disco era (as GG mentioned). In my (admittedly limited) experience, both words still have a limited currency. I'm not sure if this current use is always knowing or affected, or if it's natural.
Edit: and there's another sense too, of course: "groove" as a noun. My impression is that this use is still fairly current in the dance music scene (... like I know anything about the dance music scene!).