Let $\mathcal M$ be a compact connected realanalytic manifold. It is well known that every continuous map $f\colon\mathcal M\to\mathbb S^1$ is homotopic to a smooth map. My question is the following. Are there any sufficient conditions on $\mathcal M$ that would guarantee the existence of an analytic map $\mathcal M\to\mathbb S^1$ in every homotopy class?
This is always true. The MorreyGrauert theorem says that $M$ has a realanalytic embedding in Euclidean space, so realanalytic functions $M\to\mathbb{R}$ separate points, so they are dense in the algebra of all continuous function (by the StoneWeierstrass theorem). Thus, given a map $f:M\to S^1\subset\mathbb{C}$ we can choose a realanalytic map $g:M\to\mathbb{C}$ with $\fg\<1$. The formula $h(x)=g(x)/g(x)$ then gives a realanalytic map $h:M\to S^1$ that is homotopic to $f$. 

