The first thing you have to do is recognize if your iPhone 3Gs is actually overheating. There are a number of different consequences from an overheated iPhone 3Gs, yet some of them may sound like common iPhone 3Gs malfunctions. If the backlight starts to become a little dimmer, you may be experiencing an iPhone 3Gs temperature problem.
The best way to notice this is if you are in a lighting condition that would not inspire the iPhone 3Gs background to dim. If you are in the middle of charging your iPhone 3Gs and notice that it suddenly stopped this could be the reason, though it is important to check the power connection to the iPhone 3Gs before assuming as much. iPhone 3Gs overheating could also be responsible for limiting calling ability, even preventing all but emergency calls.