Admonishment. Sternly reprimand someone for what they said or did (or didn’t do). ‘Mind’ is used to refer to one’s deeply held belief or opinion, so give a piece of it is to explain one’s wrongness in direct terms. (Compare to a Put in their place, Tongue lashing or Tell off.)
“Young lady I toldĀ you that boy was no good for you and I’m going to give you a piece of mind if you ever date him again.”