Everyone is born with an imagination—that's how we survive from day to day, by extrapolating based on our experiences, without having any proof that our prediction will ever bear out as fact—but its goodness is a subjective matter. Considering the likelihood of anyone thinking of The Next Great Story, only to go to the bookstore and discover that someone else got there first, it's less the quality of imagination and more the exploration of it. In that regard I'm reminded of something Neil Gaiman said: "You get ideas from daydreaming. You get ideas from being bored. You get ideas all the time. The only difference between writers and other people is we notice when we're doing it."
That's pretty much what it amounts to. I'll also go so far as to change 'writers' to 'artists'—and I mean that word in the most general sense, which includes fashion designers, architects, and so on. As a demographic of the human population, artists have learned to consciously harness their imaginations. This usually starts with a support network, even if it consists of just one person. "This is good work" may be one of the most important things someone can say to a fledgling artist, but it's up to the fledgling artist to not get a big head and assume that "good work" is tantamount to "flawless."
But that support can only go so far. Eventually, a caring supporter has to gently suggest proofreading or using photos to understand foreshortening and shadowing. This is where the artist has to have drive—the urge to keep going no matter what. Criticism, constructive or otherwise, is never easy to accept, but it can be handled with grace. The inability to realize that not all harsh criticism is destructive is another area where artists falter, because they take it as a personal attack and get defensive. If they become exhausted or otherwise give up easily, they have to settle for a life of mediocrity. All casual authors stop here, limited mainly by the weight of their own egos.
I first started writing when I was around ten years of age. My parents weren't exactly encouraging, but they didn't dismiss my imagination or limit the things that sparked it (e.g., I've never been told I'm "too old" to watch cartoons or read children's books). So at the time, with no real-life frame of reference, I believed I was amazing and inventive. The reality? Other than the spelling, the stuff was AWFUL. Flat, trite dialogue; chapters consisting of single, gigantic paragraphs; the infamous telling instead of showing . . . I'd done it all. But I kept writing, because no one told me I had to stop. In seventh grade and ninth grade, I had teachers who told me I wrote well. In hindsight, the stuff from that era is nearly as terrible as what came before it (melodrama like WHOA), but I knew I'd improved and I trusted my teachers to be kind to but honest with me.
So I kept writing and improving, little by little, and my most notable improvements came after I got up the guts to post online and subject myself to peer review. It's been ridiculously helpful because there are so many eyes and voices sharing their thoughts.
So the answer is yes—given time, anyone can learn to write. I won't say that there aren't people with "natural talent," for whom writing is a little easier than for others, but I think that talent manifests primarily as the drive to write, write, write, no matter what. Talent or no, all things become easier when done repeatedly—ask any athlete. And that means the drive to write can be fostered by any person with a decent sense of self-discipline; they can learn to notice when they get ideas and then have the wherewithal to grab and mold them. It's just a matter of wanting it that badly.