how was he selected?
He underwent physical and psychological testing conducted in Moscow.
Yuri Gagarin
 He underwent physical and psychological testing conducted at Central Aviation Scientific-Research Hospital, in Moscow, commanded by Colonel A.S. Usanov, a member of the commission. 
who was the first person who went to space Yuri Alekseyevich Gagarin when was he born? 9 March 1934 where is he from? Village of Klushino near Gzhatsk
wiki:19654443
Yuri Gagarin [SEP] Selection and training
Gagarin's selection for the Vostok programme was overseen by the Central Flight Medical Commission led by Major General Konstantin Fyodorovich Borodin of the Soviet Army Medical Service. He underwent physical and psychological testing conducted at Central Aviation Scientific-Research Hospital, in Moscow, commanded by Colonel A.S. Usanov, a member of the commission. The commission also included Colonel Yevgeniy Anatoliyevich Karpov, who later commanded the training centre, Colonel Vladimir Ivanovich Yazdovskiy, the head physician for Gagarin's flight, and Major-General Aleksandr Nikolayevich Babiychuk, a physician flag officer on the Soviet Air Force General Staff to the Commander in Chief of the Air Force.