Does $A$ a UFD imply that $A[T]$ is also a UFD?
You should know that if $k$ is a field, then $k[x]$ is a UFD (even a Euclidean domain). So given $g(x)\in A[x]$, first write it as $g(x) = cG(x)$, where $c$ is a constant and $G(x)$ is primitive. Then show that a primitive polynomial in $A[x]$ is irreducible if and only if it is irreducible when viewed as a polynomial in $k[x]$, where $k$ is the field of fractions of $A$. Then use this to take an arbitrary polynomial in $A[x]$, and factor it by "factoring out the content, then factoring it over $k[x]$, and then "lifting the factorization" back to $A[x]$. The argument is exactly the same as that used in the case of $\mathbb{Z}[x]$ with Gauss's Lemma.
Now, since $\mathbb{Z}$ is a UFD, then by this argument so is $\mathbb{Z}[x_1]$; which means that so is $\mathbb{Z}[x_1][x_2]\cong\mathbb{Z}[x_1,x_2]$. Which means that so is $\mathbb{Z}[x_1,x_2][x_3] = \mathbb{Z}[x_1,x_2,x_3]$. Etc. The same holds for polynomials over a field, since a field is trivially a UFD (or because you know that the first polynomial ring, $k[x_1]$, is a UFD).
There is a slick general way to do this by localization (usually credited to Nagata). Suppose $\rm\:D\:$ is an atomic domain, i.e. nonzero nonunits factor into atoms (irreducibles). If $\rm\:S\:$ is a saturated submonoid of $\rm\:D^*$ (i.e. $\rm\,cd\in S\!\iff c,d\in S)\,$ and, furthermore, $\rm\,S\,$ is generated by primes, then $\rm\: D_S$ UFD $\rm\:\Rightarrow\:D$ UFD. $ $ This is often called Nagata's Lemma.
This yields said slick proof of $\rm\:D$ UFD $\,\rm\Rightarrow D[x]$ UFD, viz. $\rm\:S = D^*\:$ is generated by primes, so localizing yields the UFD $\rm\:F[x],\:$ $\rm F =\:$ fraction field of $\rm\:D.\:$ Hence $\rm\:D[x]\:$ is a UFD, by Nagata.
This yields a more conceptual / structural view of the essence of the matter (vs. the traditional argument by Gauss' Lemma). Moreover, the proof generalizes to various rings closely related to GCD domains, e.g. Riesz/Schreier rings, which provide refinement-based views of UFDs (which prove more convenient for noncommutative generalizations).
The fact that $A$ is a UFD implies that $A[X]$ is a UFD is very standard and can be found in any textbook on Algebra (for example, it is Proposition 2.9.5 in these notes by Robert Ash). By induction, it now follows that $A[X_1,\ldots,X_n]$ is a UFD for all $n\geq 1$.