In 1926 Gavrilov entered the Peter the Great St. Petersburg Polytechnic University, but was expelled after a few months due to anonymous letters.
There Gavrilov together with his wife Olga taught until 1930, then he was transferred to Derbent to the first Mountain Jewish school, named after Aron Ehrlich.
From the first days of the World War II, Gavrilov volunteered for the front; he demobilized from the army at the end of 1946, returned to Derbent.
[3] Until 1947, Gavrilov worked as director of the Mountain Jews school in Derbent that named after Lazar Kaganovich.
[5][6][7] Gavrilov published his poems, stories, plays and translations into the Mountain Jews almanac (Juhuri:Ватан Советиму) – "Our Soviet Motherland".