Answer
$(g^4+3)^2$
Work Step by Step
The first term is $g^4$ squared, the last term is $3$ squared, and the middle term is twice the product of these two terms. Now we can factor the trinomial into a binomial squared.
$g^8+6g^4+9$
$=(g^4+3)(g^4+3)$
$=(g^4+3)^2$