Heredity is the passing of traits to offspring (from its
parent or ancestors).
That being said, the smallest unit of Heredity is a gene,
because a gene is the smallest unit capable of conveying a genetic
message. Technically the smallest unit of heredity is a cistron,
but that's essentially the same as a gene.
I would have said a nucleotide, but a single nucleotide can't
convey a hereditary message.