And from my grandfather more broadly, I got a both an interest and some background. He was involved in the Hubble Telescope, spy satellites, and the like. So I think that the example and influence of someone knowledgeable and enthusiastic is very important.
On my own, I read a lot of science fiction, which gave a mystique and romance, as well as some real information and knowledge, at least in the "harder" sub-genre. And I remember as a teenager subscribing to Omni magazine, devouring both the factual articles and the fiction.
Unfortunately, I also remember teachers that fed us science as facts, rarely sparking wonder or amazement at how the world actually works. I think that institutionally, the educational system for science is broken.
I posted about it earlier and will try to find that post, but I would highly recommend it. It touches on many facets of science and how they might evolve and coexist over the next 1000 years. I got a copy for my daughter and I hope she gets as much out of it when she's older as I did when I was younger.