What is the phase of the Fourier Transform of $h(n)={\frac13,\frac13,\frac13}$ (zero position is at 2nd element) I am using Digital Signal Processing Principles, Algorithm and Applications,  4th edition written by Proakis and Manolakis. Here is s a part that I don't understand.

$h(n)={\frac13,\frac13,\frac13}$. The zero position is at the 2nd element.
Hence, its Discrete-Time Fourier Transform (DTFT) is: $$H(\omega)= \frac13(e^{j\omega}+1+e^{-j\omega}) = \frac13(1+2\cos{\omega})\,.$$

Since only the real part exists, I assume that the phase $\tan^{-1}\frac{H_I(\omega)}{H_R(\omega)} = 0$, where $H_I(\omega)$ and $H_R(\omega)$ are the imaginary and real part, respectively. However the book says that the phase is $0$ for $0\leq\omega\leq\frac{2\pi}{3}$ and $\pi$ for $\frac{2\pi}{3}\leq\omega\leq\pi$.

Sorry that I'm not good at Latex.
The result on the phase comes from writing $H(\omega)$ as a modulus/phase product: $H(\omega) = |H(\omega)|e^{-\imath\phi(\omega)}$. The value of $\phi(\omega)$ is consistent with the sign of $(1+2\cos \omega)$.



There is a little inconsistency is your notation (maybe from the book!): the phase seems to takes both values $0$ and $\pi$ at $w=\frac{2\pi}{3}$. This is not vital as the modulus vanishes at this point. 

What you might have forgotten in your reasoning is the fact that $t\to \tan t$ is $\pi$-periodic, and that $\tan \pi  =0$ too.