Welcome to our forum.
Did you take a photo of the GFCI before you took it out?I'm not an electrician (and I guessing you're not either because your asking this question) but to me it looks as though you have the neutral (white) wire going to ground and the ground (green) wire going to the GFCI. Or at least that what it appears to me from the photo but the green wire kind of disappears from view and may be wrapping itself along the back of the GFCI to ground.
From the pictures it looms as if the gfci in the box is wired correctly. The wires from the panel box to the gfci should connect as so. Black and red on feed side of breaker. Neutral to the neutral block and ground to ground block. The wires go to the tub should hook up red and black to breaker neutral to the breaker. The pre wired nuetral from the breaker goes to the neutral block and ground to ground block..... on the hot tub wiring it looks like u have an 8guage neutral wired into 3 green wires. The neutral has to hook up to one on the 3 wire blocks at the back on your control.box by your black and red the greens its tied into are probably ground wires that should be hooked into your ground block.
In the tub side box it appears that the neutral (white) has been capped off and isn't connected to anything.