I often come across the terms Unity and GNOME while reading about Ubuntu. I understand that Unity is the default desktop environment for Ubuntu. What is GNOME and how is it related to/different from Unity?
What is GNOME?
It is created and maintained by the GNOME foundation. They are the driving force behind a large number of popular applications, as well as the providers of a set of libraries such as GTK, GObject and even a language called Vala, which are used to build the applications in the GNOME DE, and are part of the GNOME project as a whole.
There are two relatively well known versions of GNOME: GNOME2, long since obsolete and dead, and GNOME3, the current version. Ubuntu have tracked GNOME (whichever version was current) for as long as I can remember. You can see GNOME2 in action in Ubuntu 10.04, for example. Once GNOME2 went away, a classic mode variously called GNOME Classic, GNOME Flashback (and possibly other names), with nowhere near the flexibility or customizability of GNOME2 was introduced. It just sort-of looked like GNOME2.
GNOME2 was forked to become MATE. MATE is the closest experience to GNOME2 you can get now, but with feature updates. Ubuntu MATE is now an official flavour.
GNOME3 is what you see when you look at the GNOME website, or when you install Ubuntu GNOME, and is underneath many applications in Ubuntu, and Cinnamon. MATE is adding support for GTK3, the library underneath GNOME3. Typically when end-users speak of GNOME3, they mean GNOME Shell (since that is what you see).
How does it relate to Unity?
You can think of GNOME as the parent of the Ubuntu default Desktop Environment (DE) (or an uncle, at least). It is the upstream project of many Ubuntu applications.
Ubuntu's default desktop environment uses most of the GNOME applications with a few changes:
Unity and GNOME Shell have a few similarities:
However, I think the similarities end there.
The Ubuntu GNOME distribution uses GNOME except the few cases where applications have been patched (like GNOME Terminal).
GNOME is a project that provide support GNOME desktop environment, which in turn uses the GNOME Shell as default shell. I will presume you are talking about the differences between the Unity shell and GNOME Shell (which are the only things that can be accurately compared).
Technically, the only differences is that while GNOME Shell uses mutter/clutter (and sometimes metacity, but is not the default) as window manager, Unity uses Compiz (in fact, Unity is a Compiz plugin, but lets forget about that) and the use of NotifyOSD instead of libnotify library. After that, there aren't any other important architectural changes. Both use most of the same libraries (which in turn seems to cause conflicts when you install both), and Unity provides integration with 3rd party services (with the Scope and Lens features).
Then the other differences are purely aesthetics, the use of top bar + launcher/dock (at the left) + dash vs GNOME's top bar + dash, the use of different theming, in general, they try to offer different user experience.
Now, from the institutional point of view, Unity is pushed forward by the Ayatana Project while as I said at the start GNOME Shell is developed by the GNOME project. And that's most of it. So, actually there's more in common between GNOME Shell and Unity than other shells, like kdm, xfwm4, etc.; through there's little in common between Unity shell and Cinnamon (if you ignore the use of GTK3).