Which of those bodies did the Democrats have the votes to carry on their own?
Both.
The Republicans were grossly outnumbered in both houses in 1964.
..............D....R Senate....67...33 House....258..176