‘To give (someone) cheek’ is like the more American expression, ‘to give (someone) lip’. As in, ‘Don’t give me none of your lip,’ etc.
In these cases cheek, lip, and even jaw (like ‘he kept jawing on’ or something) metonymically represent the act of speaking. Thus someone who is ‘cheeky’ is someone who speaks too easily, with insolence or impudence, is glib, disrespectful, etc.
I’m not British so I don’t know whether the word’s meaning has expanded and can define non-verbal behavior as well. Maybe someone else can answer that. But the above is how the word originated.
Hope this helps.