The fact that the Schur (that is, element wise) product of two positive definite (symmetric) matrices is positive definite immediately implies (using the convexity of the positive semi definite cone) that if $A$ is PSD, then so is $B=A_f,$ such that $b_{ij} = f(a_{ij}),$ where $f$ is an analytic function all of whose coefficients are positive. The question is, is this result sharp, or are there other $f$ which maps the PSD cone into itself by being element wisely applied?
If the matrices are real and the function you have in mind is realvalued, then you indeed get the characterization you suggested. This was first shown in "I. J. Schoenberg. Positive definite functions on spheres. Duke Math. J., 9:96108, 1942" under the additional assumption that $f$ is continuous. As noted by UwF in an earlier comment, it was shown in arxiv.org/abs/0709.1235 without the continuity assumption.
This can be generalized to matrices over $\mathbb{C}$ as well. You just have to be slightly careful, since there's another "obvious" elementwise map that preserves positive definiteness, but is not analytic: complex conjugation.
With that in mind, it is known that this is pretty much the only wrinkle that occurs in the complex case. It was shown in "C. S. Herz. Fonctions operant sur les fonctions definiespositives. Ann. Inst. Fourier (Grenoble), 13:161180, 1963" that every elementwise function $f$ preserving positive definiteness is of the form
$$f(z) = \sum_{i,j=0}^\infty c_{ij} z^i \overline{z^j}$$
with this series converging everywhere and each $c_{ij} \geq 0$.
The product you're describing (i.e., the entrywise product) is usually referred to as the "Hadamard product" – although, confusingly, the fact that it preserves positive semidefiniteness gets called the "Schur product theorem". Moreover, a function on matrices defined entrywise is called a "Hadamard function" on matrices.
The question you're asking appears on page 452 of Horn and Johnson's Topics in Matrix Analysis (maybe try this link) followed by the statement that, "A complete answer to this question is not known, but it is not difficult to develop some fairly strong necessary conditions" on such a function.
Actually, the current edition of H&J2 is now a couple of decades old, and there's certainly been some work done on this topic since. (It's a bit outside my specialty, but I seem to recall the question is of interest in statistics for some reason?) A paper by I. J. Schoenberg called Positive definite functions on spheres seems to be a seminal reference, so a search for papers which reference that one is bound to turn up something of interest for you. (A quick search turned up this paper on the arXiv, for example.)

1$\begingroup$ This paper arxiv.org/abs/0709.1235 is definitely relevant, see the characterisation in Thm 4.1. $\endgroup$ – UwF Jul 20 '14 at 13:24

2$\begingroup$ @UwF The theorem you give actually states that the characterization in my question IS sharp, so if you make this an answer, I would be happy to accept it! $\endgroup$ – Igor Rivin Jul 20 '14 at 15:49
Schoenberg's theorem was first shown without the continuity assumption by Rudin in this paper in Duke Math. J., in 1959. In particular, prior to the work of Herz cited above.