Great question. Maybe the phenomenon is less surprising if one thinks that there are $\infty$ ways to generalize a question, but just a few of them make some progress possible. I think it is reasonable to say that successful generalizations must embed, consciously or not, a very deep understanding of the problem at hand. They operate through the same mechanism at work in good abstraction, by helping you forget insignificant details and focus on the heart of the matter.
An example, which is probably too grandiose to qualify as an answer, since your question seems very specific, is Fredholm theory. At the beginning of last century integral equations were a hot topic and an ubiquitous tool to solve many concrete PDE problems. The theory of linear operators on Banach and Hilbert spaces is an outgrowth of this circle of problems. Now, generalizing from $$ u(x) + \lambda \int _a ^b k(x,s) u(s) ds = f(x) $$ to $$ (I+ \lambda K) u = f $$ makes the problem trivial, and we do it without thinking. But it must have been quite a shock in 1900.

