This song, which many think is a Bob Dylan tune, was written by P.F. Sloan (aka 'the poor man's Bob Dylan') and Steve Barri, who actually recorded it under the name 'Grass Roots'. They then went searching for a band to help them cash in on the folk-rock mania. Presto! The Grass Roots came into existence.
Sloan and Barri went on to write a number of hits, including Barry McGuire's classic, Eve of Destruction:
"You're lookin' good, it's hard to fight it
But no use explainin', I've already decided
That livin' with you, it's worse than without you
I won't spend a lifetime a-worryin' about you
Oh, things got rough and you disappeared
Now I'm back on my feet
But look, look who's standing there
Where were you when I needed you
Where were you when I wanted you
Where were you when I needed you"
-- Where Were You When I Needed You by Steve Barri and P.F. Sloan