The Soviet spacecraft Luna I became the first to pass the moon.

Luna 1 was the first spacecraft to reach the Moon, and the first of a series of Soviet automatic interplanetary stations successfully launched in the direction of the Moon.

As the craft headed for the Sun’s orbit it, came within just 3,700 miles of the moon.

Source