Wiring problem? Unplug the connector and check the pins with a multimeter. If it looks alive, trace the wiring from the connector as far as you can. If you're lucky you'll be able to visually see a problem, it not, you'll have to probe the wires until you find the fault. If it's actually dead at the sensor, are you sure you've got the correct part?
Some vehicles have two sensors, one going to the powertrain controller and the other going to the cluster. It sounds like you've only got one. I'd guess the PCM is feeding the gauge cluster. When the sensor is 'dead', the PCM should command any cooling fans you have on to full power. When the sensor seems to be working, if you pull the wiring connector, do the fans come on immediately?
As far as the correlation with hard shifting, I'm not sure what's going on there. Do you have a transmission cooler? If so, maybe the PCM is altering the shifts since it doesn't know how hot the cooling system is. If not, maybe you've got a ground problem in your wiring harness and the coolant sensor is sharing it with something in your transmission? Timo's got the right idea, check the continuity on the pin for the ground wire on the connector for the sensor when the gauge is dead vs when it's working. It's probably a two wire setup, if so, the black wire should be ground.
I'm not sure if the volt/ohm specs in this article are applicable to your vehicle, but it's a start. The enthusiast forums at j-body.org and clubcav.com probably have more detailed information. Hopefully there is a sticky thread or FAQ that covers your situation.
There's always a Haynes/Chilton manual for wiring diagrams and troubleshooting info, but the ultimate reference would be the factory service manual from Helm, but it looks like yours is $200. Pricey, but it will have complete wiring diagrams and probably a troubleshooting tree for your situation. Haynes or Chilton will have similar info, but it will be less detailed as they're trying to cover multiple years and models in one tome.