Meritline sells a iPhone 3G-compatible 1600mAh battery for $5.99 shipped. The standard 3G battery has a capacity of 1150mAh, so in theory the replacement should give you about 50 percent more runtime.
Now it’s time for some surgery. The iPhone may look airtight, but a little careful prying with an X-Acto knife (or similar tool) will get the case open.
To see how, check the nicely illustrated iPhone 3G Repair Guide at Rapid Repair. Once you hit Step 10, just swap in the new battery and close everything up. That’s really all there is to it.