We investigate the electronic structure and electron transport properties of Si nanowires attached to Au electrodes from first principles using density functional theory and the nonequilibrium Green's function method. We systematically study the dependence of the transport properties on the diameter of the nanowires, on the growth direction, and on the length. At the equilibrium Au-nanowire distance we find strong electronic coupling between the electrodes and nanowires, which results in a low contact resistance. With increasing nanowire length we study the transition from metallic to tunneling conductance for small applied bias. For the tunneling regime we investigate the decay of the conductance with the nanowire length and rationalize the results using the complex band structure of the pristine nanowires. The conductance is found to depend strongly on the growth direction, with nanowires grown along the ⟨110⟩ direction showing the smallest decay with length and the largest conductance and current.