I think the whole issue is just a murky mess, honestly. I largely agree with what Nerys says above -- that the only way fan fiction could be argued to be harmful is if the fans who would normally buy licensed Treklit choose to read fan fiction instead because they find it superior. However, I have seen very little evidence that this is the case. Most people I know who read fan fiction ALSO read the licensed novels. I know a few people who have chosen fanfic over the novels, but I think they would have given the novels up anyway, because they were so displeased with the direction the continuity went. (And yes -- if there's fanfic that is so good it's stealing readership from the pros ... perhaps the pros should consider hiring those authors to write novels.)
On the other hand, I think fanfic promotes the franchise overall and helps keep interest and loyalty alive. Fans who band together and form creative communities like this one are never a bad thing for a franchise. That kind of loyalty and enthusiasm is a big deal. It wouldn't be tolerated if it wasn't beneficial on some level, IMO.
Adding to the confusion are the people who have started in fanfic, ended up writing the licensed stuff, and then once they were "official," published the fanfic later. I don't know how common this is, but I've heard of at least a couple of instances of it.
Anyway, I fall on the side of "it's okay to do this," but obviously no one should make money off of it unless it's through official channels (so the owners get their cut). And if the author says "no, please don't do this," a la Anne Rice, then I think that should be respected.