I wanted to include a spider-like race in my book (not a typical drider, but more like a hairy hominid covered in tarantula-like hair and thinner and longer limbs and fingers). However, I wanted them to have some silk-producing capabilities (or at least something similar), but I'm not sure how it could work. Would it be possible for a mammal to evolve the capability to produce a substance similar to spider-silk (I'm not sure where it would produce it from, but maybe it's skin or saliva)? If the question is too vague, I'll do my best to edit it with suggestions.
Humans aren't patient enough for evolution, so we've just gone ahead and done it already. The spider silk gene has already been spliced into goats, which then produce the spider silk protein in their milk. There is ongoing research to splice this gene into plants which could then be harvested for spider silk. So overall, it's absolutely possible for other animals to produce spider silk. If you want this to evolve naturally, the question now becomes about what selective pressures would result in a spider-silk producing mammal in the natural course of evolution.
Yes, of course. There's always Horizontal Gene Transfer sometimes called lateral gene transfer.
Gene transfer is most commonly thought of as two parents creating a child, and passing genetics that way. Bacteria, for example, can also exchange genetic information laterally (horizontal) from one to another without having to create a new one. This process also includes the spread of antibiotic resistance genes among bacteria
Horizontal Gene Transfer in animals has the organism's DNA altered after birth. For it to be inherited it would need to happen in the gametes, either egg or sperm. For just the individual it would need to happen in a stem cell.
There's a couple ways to do it, viral or bacteria. Either injects new DNA into the target cell.
As you know, viruses can get into your cells and change the genetic coding to create more viruses. For your purposes though it would need to be a side effect or error of an infection resulting in beneficial genes rather than more viruses. Quite possibly in the matter of silk the genes would need to come from another host of the virus, likely an arachnid.