Gavrilović received the 112th position on the Progressive Party's Aleksandar Vučić – Serbia Is Winning list in the 2016 Serbian parliamentary election and was elected when the list won a landslide victory with 131 out of 250 mandates.[2] During his time in the assembly, he was a member of the committee on agriculture, forestry, and water management; a deputy member of two other committees; and a member of the parliamentary friendship groups for Australia, Austria, Belarus, Brazil, Finland, Germany, Japan, Kazakhstan, Russia, and Syria.[3] He resigned from the assembly on October 11, 2017.[4]