Here's what a 5-2-66 memo from Roddenberry says about Spock:
Mister Spock is the ship’s Science Officer, in charge of all scientific departments and personnel aboard the U.S.S. Enterprise. As such, he is the ship’s Number Two ranking officer.
An even earlier document -- the first draft of the writer-director information guide, dated 3-15-66 -- is even clearer:
Mister Spock. This is the ship's Science Officer, the number two command position aboard the starship U.S.S. Enterprise.
And here's what the 7-8-65 draft of "Where No Man Has Gone Before" says when it introduces Spock:
Ship's Captain JAMES KIRK sits across the table from Science Officer MISTER SPOCK, a three-dimensional chess game between them.
The whole thing seems pretty cut and dry to me. Spock is the ship's science officer, the ship's science officer is second-in-command, therefore Spock is second-in-command.