The Gödel sentence must be provable or unprovable by itself - you have to resolve all definitions until it only uses the elementary symbols of Peano arithmetic. What is the correct way to resolve definitions of primitive recursive functions so that the Gödel sentence stays Π1?
According to http://www.staff.science.uu.nl/~ooste110/syllabi/peanomoeder.pdf page 10, the formula that corresponds to a primitive recursive function with f(0)=c and f(x+1)=g(f(x),x) is something like this:
∃am( rm(a,m*(0+1)+1)=c ∧ ∀i<x( g(f(i),i)=rm(a,m*(i+1+1)+1) ) ∧ rm(a,m*(x+1)+1)=u )
Informally: There exists a,m such that the remainder of a divided by m*(i+1)+1 is f(i) for all i <= x (the sequence of values of the function up to f(x) is coded into a,m).
The value of f(x) is in free variable u. Resolving the remainder function rm(a,b) needs additional existential quantifiers.
The formula above is a Σ1 formula. Adding a generalization (like in the Gödel sentence) makes it Π2. But the Gödel sentence is said to be Π1.
So is the formula above the wrong way to resolve definitions in the Gödel sentence or are the unbounded existential quantifiers no problem for some other reason? The paper linked above seems to suggest the latter on page 15/16.
The standard Gödel construction makes the Gödel sentence have the form $\forall x\neg Gdl(x)$ where $Gdl$ is a $\Sigma_1$ wff expressing a certain primitive recursive property. Note the negation sign! It is crucial. The negation of a $\Sigma_1$ wff is $\Pi$, and the universal quantification of such a wff is still $\Pi_1$. So the Gödel sentence is indeed $\Pi_1$.
Look carefully and you'll see that there is a crucial negation sign! The Gödel sentence says that every number is such that it isn't the number of the proof of such-and-such. [E.g. Check out the details in my Gödel book.]