I think it’s both. Or at least it can be.
My mom is a very good singer. She was has classically trained and has always sung (she had a good chance to go pro, but considered herself too flakey to pursue it). She also plays the piano well.
My dad could carry a tune but never learned to play an instrument. All my sisters and I can sing well enough (can carry a tune, were in church choir, etc.) but never had the “fire in the belly” to really get into singing. Likewise, we all learned how to play the piano and had some natural talent for it, but never pursued it too much.
In general, at our best, we’re fair to middlin’ singers and musicians. We were given lessons, encouraged to learn, and are passionate about listening to music. Music is a big deal for our family.
Contrast that with some friends of ours, who loved music too. Quite as much as we do, I think. The parents (or at least one) was tone deaf. Neither parent really played an instrument well. They loved listening to music, but I don’t think that innate talent was there as much. Their kids also love music, but at least one is also tone deaf (though I think is in denial about it). I think that they will eventually learn musical instruments and possibly do well, but my hunch at this time is that it won’t be so innate for them.
So in our family, it was exposure, education, enthusiasm, and innate talent. It all helped. Granted, none of us kids are great musicians, but it’s certainly part of us. Learning wasn’t that hard either—I remember tinkering on the piano when I was in kindergarten and figuring out the beginner piano music book on my own. It seemed so logical to me. When I tried to show a “non-innate” musical person some basics on the piano, they looked at me like I was speaking Martian.
I do want to add that I think talent is overrated. Talent is great and it can really help, but if you’re too uninspired or lazy to do much with it, you’re never really going to get too far. For instance, I love music and on my best day I have a tolerable ability, but I’ll never really go very far with it because I simply don’t want to work that hard at it. Compare that to how I feel about drawing and art—my real obsession—and there’s a big difference. I have some innate ability for art, but I love it. A lot. I’ve spent hours and hours and hours practicing and drawing. So naturally I’m better at it than I am with music, because I’m willing to work at it. Interesting, my mom draws well too (I think I “inherited” some of her ability), but she doesn’t seem to have the fire in the belly about drawing as she does with music.