Beamforming can provide huge array gains in large-scale antenna systems under the condition that the channel state information (CSI) has been obtained by training signals. During the initial access, no CSI is available at the receiver because the communication link between the transmitter and the receiver has not been established. This paper considers the problem of obtaining the beamforming gain for receivers with the analog beamforming architecture in the initial access, assuming that a fixed beam pattern is employed. We present the necessary and sufficient condition to obtain the receive beamforming gain in the absence of CSI, and then derive the upper bound of the receive beamforming gain for different antenna spacings. It is shown that oversampling in space is needed at the receiver to obtain a non-trivial beamforming gain without CSI, since the total received signal power is proportional to the number of receive antennas. We also design the beamformer that can achieve the upper bound. Numerical results demonstrate the effectiveness of the proposed beamformer in the scenarios of downlink synchronization and random access in millimeter-wave systems.