Are there any GPS recording applications for the iPhone?
There are a ton of 'em; Cyclemeter, Strava, MotionX, and many, many, others to name a few.

Most have an export option that'll spew out a gpx file (or one of a different format) that you can then do whatever you want with.

(I personally use Cyclemeter for recording and sharing bike rides -- there are many others that are more customized to other kinds of activity)