Let $\mathcal A$ be a C*algebra and $s(\mathcal A)$ the set of states on $\mathcal A$, with the weak* topology, as a subspace of the dual space. Suppose $f: s(\mathcal A) \to \mathbb C$ is a continuous function. Does there exist an element $a\in \mathcal A$ such that $f(\phi) = \phi(a)$ for all $\phi\in s(\mathcal A)$?
No. Such an element $a$ exists if, and only if, $f$ is affine and continuous in the weak* topology. Notice that $s(\mathcal{A})$ is a convex set, so it makes sense to require $f$ to be affine, meaning $f(\lambda\phi+(1\lambda)\psi)=\lambda f(\phi)+(1\lambda)f(\psi)$ for all $\phi,\psi\in s(\mathcal{A})$ and $\lambda\in[0,1]$. Addendum: A good reference, though it does not even mention C*algebras, is Erik M. Alfsen: Compact convex sets and boundary integrals (1971). The reason is that the selfadjoint part of a (unital) C*algebra is an order unit space, meaning a partially ordered vector space with a special element $e$ (the order unit) so that the unit ball is $\{a\colon e\le a\le e\}$. Such a space has a state space $K$ consisting of all positive linear functionals $\phi$ with $\phi(e)=1$, and indeed the space can be recovered as the set of continuous, affine functions on $K$. For a more modern treatment of state spaces of C*algebras, see Erik M. Alfsen and Frederic W. Schultz: State spaces of operator algebras (2002). 

