Letting go of your polearm and punching
This was my immediate assumption of how you imagined this going, and it might work but it’s on very thinnest of ice, officially.
First, you need to have an answer to a previous question: Can you take free actions during attacks of opportunity?
If you cannot, then you definitely cannot let go of the polearm to take an attack of opportunity: it’s a free action to let go of the polearm.
Even if you can, it’s unclear if the fact that you could let go of the polearm to hit someone with the spiked gauntlet means you threaten that space. One could easily say that, even though you could let go of it once you are provoked, before you are provoked you aren’t performing an action and therefore cannot let go of the polearm and therefore do not threaten anything.
You can also make a balance-based argument, saying that not threatening interior squares is an intentional drawback of reach weapons that should not be so easily thwarted. Spiked chains (which threaten near and far) are special for a reason. And there are concerns about other free actions you might take during an attack of opportunity and the problems those might cause.
Ultimately, getting free actions during attacks of opportunity is not explicitly spelled out in the rules, and requires fairly “optimistic” reading between the lines. It requires assuming an exception exists even though none is explicitly listed—somewhat dubious. And extending that to allowing you to threaten squares based on a free action you might take is possibly more dubious still. And the limitation on reach weapons not threatening near you is definitely real and intended.
But I still allow it. I think the “implicit” exception makes vastly more sense, and that harping on its absence is fairly pedantic. I think that the fact that a polearm and spiked gauntlet requires investing in two separate weapons still gives spiked chains a large advantage. And plenty of other options—armor spikes, unarmed strikes—don’t require letting go of anything and absolutely work. No free action during an attack of opportunity has ever been a problem for my games. Finally, frankly, I think attacks of opportunity are one of the only nice things that martial characters get, so I think it’s good to allow them to actually do so. So I acknowledge that you probably can’t, strictly speaking, but I think the game is better off if you can—and that there’s enough room there to allow it.
Punching while holding your polearm
This didn’t even occur to me as an option at first. I always assumed your hand had to be free in order to attack with a gauntlet, spiked gauntlet, or unarmed punch, but I cannot find that anywhere in the rules.
Certainly, from a narrative or simulationist standpoint, it’s not hard to imagine the maneuver, though some weapons would probably interfere (punching daggers spring to mind). But a polearm? Easy to imagine.
And from a gamist perspective, since non-punch unarmed strikes, or armor spikes, are also options, it doesn’t really add anything to allow punching, whether with a bare hand or a spiked gauntlet.
The only real argument against it that I can find is that unarmed strikes are specifically unarmed. Arguably, if you are armed with some weapon, you cannot use one. Except we know that isn’t true, since you can still kick. And spiked gauntlets aren’t unarmed anyway, despite the similarity (and unlike regular gauntlets, which reference unarmed strikes, spiked gauntlets are written as entirely separate).
So yeah, given the lack of a rule saying you can’t, and the lack of compelling narrative, simulationist, or gamist reasons to prevent you, it certainly seems to me like you could.
Conclusion
I would allow both letting go of the polearm to punch, and punching with the polearm in hand. I would allow both cases to happen without requiring extra investment or enforcing additional penalties. Either maneuver is equivalent to attacking with armor spikes or a (non-punch) unarmed strike anyway, so there is no particular reason why this approach should be worse, to my mind.
I might object to punching with certain weapons in hand. For instance, a punching dagger stabs someone when you punch them: it’s hard to imagine an effective way to punch someone without stabbing them while you have a punch dagger on hand. Maybe an overhand smash, hitting with the bottom of your fist while the blade sticks out to the side, but that might be awkward. “Might be awkward” sounds like a reasonable place to put in a small attack penalty; probably just −1 though, since you can see how it would be done and it doesn’t really take fantastic skills to make it happen.
But punching with a polearm, or punching with a polearm in the other hand, doesn’t really seem awkward at all. Those I would just let happen.