What are KDE and Gnome?

Notice that neither KDE nor Gnome are window managers (like FVWM or Enlightenment or Sawmill or Window Maker) or windowing systems (that would be X).

What they are is desktop environments. That's to say, they define the software environment where the window manager and the other GUI programs run. Gnome (I know zilch about KDE) provides standardized interface components (a bit like Motif did), and standardized preferences. It also provides an implementation of CORBA, for inter object communication. One useful user-level Gnome feature is the ability to save a whole session, so that when you log in again the same programs reopen, and actually open those files you were editing.

For example, I run Window Maker under Gnome, because I like the Gnome taskbar. But I could be running it under plain X.
There are programs, like grip, that require Gnome. Luckily, old "plain-X" programs like xbiff, xterm or xv don't give a damn about the presence of Gnome, and just run happily in their old unadorned way. There exist Gnome-aware subsitutes, like the Gnome terminal.
Some programs require that you have installed the Gnome libraries, but you don't need to be actually running a Gnome based window manager. If memory does not fail me, Galeon works like that.