Suppose $n=1$. Then, if $f=u+iv$ is holomorphic, $u,v$ are harmonic, i.e. $u_{xx}+u_{yy}=0$. Hence a necessary condition for $u$ to be the real part of a holomorphic function is that $u$ is harmonic. The converse is true if $U$ is simply connected: See Theorem 6.3 in http://www.math.binghamton.edu/sabalka/teaching/09Spring375/Chapter6.pdf.
In the general case ($n \ge 1$) one has to consider pluriharmonic functions: A function $u(x_1,y_1,...,x_n,y_n): U \subseteq \mathbb{R}^{2n} \to \mathbb{R}$ is called pluriharmonic, if it is $C^2$ and satisfies $u_{x_jx_k}+u_{y_jy_k}=0$ for all $1 \le j,k\le n$.
The real part of a holomorphic function $f: U \to \mathbb{C}$ is pluriharmonic and conversely, each pluriharmonic function is locally (in a disc) the real part of a holomorphic function. See Theorem 26 of http://www.dms.umontreal.ca/~gauthier/6140.pdf.