OpenJDK’s native Java compiler is, itself, written in Java; as a consequence, you need a working previous version of Java in order to build a new version.
If you’re starting from scratch on a platform for which no existing JDK binaries are readily available (or if you’re working within certain Free Software projects whose charters prohibit the use of proprietary build dependencies), then GCJ (or some of its underlying components) can be one potential solution to the chicken-and-egg problem of getting a working, albeit somewhat inefficient bootstrap Java in place, in order to move on to build the more desirable OpenJDK.
In fact, back when OpenJDK was first announced, significant effort (via the IcedTea project) was spent in fixing up GCJ to get it to the point where it was up to the task.
GCJ is obsolete. It was started a long time ago because people wanted an open-source alternative to the Sun JDK, and it was never particularly good. Now that Sun open-sourced their JDK, there’s absolutely no reason to use GCJ (but it still lurks in some Linux distros).