Hint $ $ If $\,R\,$ is a domain then easily $\,p(x)\,$ a unit $\Rightarrow\ a_i = 0\,$ for $\,i>0.\, $ Now $\, R\to R/P,\, $ for $\,P\,$ prime, reduces to the domain case, yielding that the $\,a_i\,\ i>0\,$ are in every prime ideal. But the intersection of all prime ideals is the nilradical, the set of all nilpotent elements.
See also my post here on reduction to domains by factoring out prime ideals.
Alternatively, more elementarily, successively examining the coefficients of $\,f\:\!g\,$ we deduce $\, a_n\:\!b_m = 0\, \Rightarrow\, a_n^2 b_{m-1} = 0 \, \Rightarrow\, \ldots\, \Rightarrow \, a_n^{m+1} b_0 = 0.\,$ But $\,b_0\,$ is a unit so $\ldots$
I think there is an elementary proof, but let's check it.
I'm relying on:
There always exist maximal proper homogeneous right ideals (by the usual Zorn's Lemma argument.)
The sum of two homogeneous right ideals is again homogeneous.
Suppose $M$ and $N$ are distinct maximal homogeneous right ideals. Then $M+N=R$, and there exists $m+n=1$ with $m\in M$ and $n\in N$. Because of the grading, the grade zero parts must be such that $m_0+n_0=1$, and because $M$ and $N$ are both proper and homogeneous, neither $m_0$ nor $n_0$ can be units of $R_0$. This implies $R_0$ is not local.
By contrapositive then, we have shown if $R_0$ is local, then $R$ is graded local.
Best Answer
Hint: The key to the other direction was showing that if $x$ is nilpotent, then $1+x+\dots+x^{n-1}$ is the inverse of $1-x$. In this direction, you show that every possible inverse must look like this.
Let the degree of $x$ be $d$. Let $y$ be the inverse of $1-x$, and suppose that the $n^\text{th}$ component of $y$ in the grading is $c_n$. Then the $n^\text{th}$ component of $(1-x)y$ is $c_n-[x]c_{n-d}$ (where $[x]$ is the $d^\text{th}$ component of $x$). Since $(1-x)y=1$, this implies $$ c_n-[x]c_{n-d}=\begin{cases} 1 & n=0\\ 0 & \text{otherwise} \end{cases} $$ In particular, if $m$ is the smallest index for which $c_m\neq 0$, then it must be true that $c_m=1$, and that $m=0$. You can also show that $c_i=0$ for all $m<i<m+d$. You then have $$ c_{d}-c_0[x]=0\implies c_{d}=[x] $$ and you can proceed by induction to show that $c_{kd}=[x]^k$. Since you cannot have infinitely many nonzero coordinates, some $[x]^k$ must equal zero.