Before seeking a repair, you might want to do some troubleshooting of your own. Sometimes a runaway process can cause an iPhone to overheat. Chris Breen provides some tips in Troubleshooting a battery-sucking iPhone 4S. I solved a problem I had with my own overheating iPhone 4 by wiping the phone and reinstalling the OS. I did a fresh install, I didn't restore the phone from a backup. (This was when iOS 5 was first release, many of these problems have been sorted out now by OS updates.)
If you can't solve the problem yourself the next step is to take the phone to an authorized Apple repair center, in general an Apple Store. Which brings the warranty into play:
From Apple's (US) warranty for the iPhone 4
This warranty does not apply: (a) to consumable parts, such as
batteries or protective coatings that are designed to diminish over
time, unless failure has occurred due to a defect in materials or
workmanship; (b) to cosmetic damage, including but not limited to
scratches, dents and broken plastic on ports; (c) to damage caused by
use with another product; (d) to damage caused by accident, abuse,
misuse, liquid contact, fire, earthquake or other external cause; (e)
to damage caused by operating the Apple Product outside
They're not going to cover damage caused by misuse and they're not obligated to replace parts to fix cosmetic damage made by the user, though they will if its is a manufacturing or design fault. Your attitude when dealing with the Genius/Repair Tech may influence the outcome so I advocate being polite, pleasant and not acting like you are entitled to extra service.
If the damage is as you describe, I doubt you'll have any difficulties. In general, it is my experience that Apple tries to err on the side of the consumer. If the damage is worse than you describe and the repair tech feels that it in some way responsible for the overheating, then service may be refused. If that happens and you feel this is unfair, escalate to the store manager and Apple Customer Relations as you feel appropriate. You can reach Customer Relations through just about any Apple support line by asking for that department by name.
In all likelihood, you're making a mountain out of a mole hill. Take the phone in and have an Apple tech have a look. You'll most likely be pleasantly surprised.
See also, Gigaom: Apple Tech Support Tips: 4 Steps to Bend Apple to Your Will