One possible answer is that Data used components from himself (I believe he even mentions using parts from himself.) While Spock was stuck with two communicators and a Tricorder. The Tricorder was too valuable to disassmble, and the communicators were far less advanced than Data.In TOS:The City on the Edge of Forever, Spock was augmenting his Tricorder for faster playback; In TNG:Time's Arrow, Data was developing a sophisticated sensor in order to discover the location of the temporal vortices used by the Devidians.
The scale of their projects were entirely different, and were shaped not just by the different materials available in 1893 and 1930, but by what they had on them when they got stranded.
Spock only had the benefit of a mostly-functional tricorder, but his goal for it was modest. A handful of tubes it was enough to achieve his goals in only a few hours.
Despite leaping 40 years before Spock, Data had an array of auxiliary chips from himself to work with, plus his phaser and tricorder. It's not hard to see how he could work a coherent energy beam into his device.