It's originally from the 1967 musical Hair, 5th element merged two songs from the musical and released it in 1968, that's the version you linked.
https://en.m.wikipedia.org/wiki/Aquarius/Let_the_Sunshine_In
The 1979 film version:
Warning, hippies as they were imagined in the late 70s: https://www.youtube.com/watch?v=BTZArvbmG_o