Just to be completely clear:
Xcode and X11 are two completely different things. Installing Xcode on your Mac is good (among other things, it gives you the compiler gcc), but that's not enough for AFNI. You *must* install the X11 package, which provides the graphical interface functions that AFNI uses. AFNI does not use Apple's built-in Aqua graphics system, since that would make the program not portable to Linux, Solaris, SGI, etc.
Before OS X 10.2, Apple did not provide X11 and you had to get it from somewhere else. Now, Apple does give us their implementation of X11, but it isn't automatically installed -- you have to install it from the OS X CDs or download the .dmg file (as Alex has provided).