You only need to know 4 terms:
- Display manager
- Window Manager
- Graphical User Interfaces (GUI)
- Desktop Environments
Are LightDM, GDM, KDM, LXDM. They normally has desktop manager somewhere in their names. These are the ones that start the xserver at boot and provide, normally, a login screen.
Compiz, Metacity, Mutter, W9dk, fluxbox, etc. are window managers. These are too many to do a list. If you want you can check all the packages that provides
x-window-manager to get a incomplete list of the window manager in Ubuntu. These only are responsible of drawing the application borders, managing the position of the windows, themes and decorations.
Grapical User Interfaces (GUI)
Anything that the user interacts in any graphical way, with icons and representations. Window Managers, Display Manager and Graphical shells, applications, etc. falls in this category. Whatever the user is using that is represented predominantly in a graphical way is a GUI.
In the Linux world, it's referred as a set of applications, packages, services, etc. that provides a complete and balanced ecosystem for the user. Unlike Window Manager or Desktop Manager, Desktop Environments take care of everything. From the login screen through your mail application, the network manager, text editor, the system settings, image viewer, file manager, etc. There are only 4 well knows Desktop Environments in Linux and Ubuntu:
- KDE Desktop Environment
- LXDE: Lightweight X11 Desktop Environment
- XFCE Desktop Environment
These have a complete set of applications, settings, services, desktop/file/window managers, internet browser, etc.
So, to address your specifics concerns:
LightDM appears as a service on my installation and is a 'Window Manager'
False, LightDM is a Display Manager.
how is this related to Compiz, which is also a Window Manager but not a service?
Have nothing in common. Both have different functions. Compiz is a window composer, window decorator, a window manager.
Is Metacity also a Window Manager?
Then there comes Gnome 3, Unity, Gnome Shell and Gnome - all of which seem to be different things.
Gnome 3, Gnome Shell and Gnome are the same thing, being practical. Unity is totally different. Unity is another shell opposed to Gnome/3/Shell. Gnome 3 Shell has been commonly called as Gnome Shell in the past, right now saying GNOME, GNOME 3 Desktop Environment or Gnome Shell carry the same meaning.