RWebb:
It's $85 to replace the battery on an "out of warranty" iPhone:
http://www.apple.com/support/iphone/service/battery/ iPhone warranty covers the battery and is for a one year period.
Some third parties will sell and install a new, comparable battery for around or less than half that. See
www.ipodjuice.com for example - these guys offer a 10 year warranty!
The original iPhone's battery is soldered to the main board, but the new 3G's is not, but I have read both batteries are difficult to get at. The price is typically half again or less if one replaces the battery his/herself; around $20.
I did read somewhere that in some cases Apple may just give you a new iPhone if you have battery problems under warranty, then repair the old iPhone and sell it as refurbished.
FYI.
Best,