Gregor Kemper answered a related question with a technique that can be used to answer this one affirmatively in the case that $g$ has finite order. If $g$ does not have finite order and we drop the integrality assumption, the answer is negative.

**If $g$'s restriction to $B$ has finite order, then its action on $B$ is linearizable.**

Proof: Note that $B$ is connected (i.e., its degree 0 component is just $k$) since $A$ is. Let $I$ be $B$'s positively-graded ideal. By the graded Nakayama lemma, any set of homogeneous elements of $I$ that generate the $k$-vector space $I/I^2$ will also generate $I$ as an ideal in $B$. By a standard induction argument, any homogeneous ideal generators for $I\triangleleft B$ are actually algebra generators for $B$. (To express an arbitrary homogeneous element $f$ in $B$, which without loss of generality can be taken to have positive degree since $B$ is connected, as a polynomial in these generators, express it first as a linear combination of them with coefficients in $B$. This is possible since $f$ has positive degree, and is therefore in $I$, and $I$ is an ideal. Since $B$ is graded, this linear relation can be taken to be homogeneous just by discarding all terms of degree different than $f$. But then the coefficients are all homogeneous of lower degree, so apply the induction hypothesis.) Since $B$ is presumed to be a polynomial algebra, $\dim_k I/I^2 = \dim_{\text{Krull}}B$. Thus any homogeneous lifts to $I$ of a $k$-basis for $I/I^2$ will automatically be polynomial-algebra generators for $B$.

Since $g$ acts as a graded automorphism on $B$, it preserves $I$. Therefore, it also preserves $I^2$. Since $k$ is of characteristic zero and $g$ has finite order, we have access to Maschke's theorem, which asserts that $I^2$ has a $g$-invariant complement $V$ in $I$. Because the action of $g$ on $B$ respects the grading, and $I$ and therefore $I^2$ are graded ideals, $V$ is even a graded vector space, i.e., it is the direct sum of its intersections with the graded components of $B$. (Indeed, for any $d\in\mathbb{N}$, we can apply Maschke's theorem in $I\cap B_d$ to find a $g$-invariant complement $V_d$ for $I^2\cap B_d$, and then take $V=\bigoplus V_d$.) Therefore, it has a homogeneous basis $\mathcal{B}$. Because $I=I^2\oplus V$, this basis descends to a basis of $I/I^2$. By the work in the previous paragraph, $\mathcal{B}$ is a set of polynomial algebra generators for $B$, so $V$ is the desired subspace.

**Remark:** This argument actually also works if $k$ has positive characteristic, as long as the order of $g$'s action on $B$ is not divisible by the characteristic. The argument also makes no use of the assumption that $A$ is integral over $B$, although if we know integrality, then we know that $\dim_{\text{Krull}}B = n$, so we know what to expect for the dimension of $I/I^2$.

**If $g$'s restriction to $B$ has infinite order, and we drop the hypothesis that $A$ is integral over $B$, then $g$'s action on $B$ may not be linearizable.**

Let $A=\mathbb{C}[x,y]$ and let $B=\mathbb{C}[x,xy]$. Let $g$ act on $A$ by $x\mapsto x$, $y\mapsto x+y$. Then $gB\subset B$ since $xy\mapsto x^2+xy\in B$, and $B\subset gB$ since $xy\in \mathbb{C}[x,x^2+xy]=gB$. Thus $B$ is fixed setwise by $G$. But $B$ is algebra-generated in distinct degrees and $g|_B$ does not act diagonally on the generators, so it is not linearizable.

The previous argument fails in this situation because the conclusion of Maschke's theorem fails: while $I^2$ is still a $g$-invariant subspace of $I$, it does not have a $g$-invariant complement.

But note that in this situation, $A$ is not integral over $B$, as $y$ is not integral over $B$.

I do not know if there is an example of infinite order $g$ and $A/B$ integral in which $g|_B$ is not linearizable.