The GPS downloads a lot of data, so if you have a weak signal the cellular radio will use a lot of power, and the phone will get warm. If it's also plugged in the battery charger in the phone will get warm. The two together can make it quite hot. There's an overtemperature protection in the phone that will shut it down if it gets too hot.
It's also possible that your charger is not of a high quality, and could be supplying too high a voltage. This causes the charging circuit to have to dissipate the excess energy as heat.
I'd suggest not leaving your iPhone plug into the car charger for the entire journey if possible? I sometimes leave my iPhone 4 to charge over night, which sometimes causes the phone to feel rather hot the next day. I'd imagine this isn't really good for the battery inside the phone, which causes it to overheat; as this is constantly powering the phone for along period of time.
If your phone feels like it gets rather hot after 30 minutes on charge or so, i'd consider going into Apple to talk about this issue. Personally i wouldn't worry to much for now. Hope this helps...
Just to update. I've now charged my phone overnight and found it not to heat up at all. I've also used the car charger, without using GPS or any other app except for the bluetooth hands-free connection, and the phone has warmed up a little, but not nearly as much as it did the other day
This seems to confirm that the use of GPS together with the car charger makes it heat up quite a lot, and I'll bear it in mind. I hope that it doesn't affect the phone.