The easiest way to get the current version number is to browse to the Site Settings page (eg. for your Central Admin site): http://myserver:ca_port/_layouts/settings.aspx.
You can also hit the database:
WHERE VersionId = '00000000-0000-0000-0000-000000000000'
ORDER BY Id DESC
The version numbers correlate with the more familiar release names listed below (note these version numbers differ from what you might see through the Add or Remove Programs applet or a DLL version):
- MOSS Beta 2: 22.214.171.12417
- MOSS Beta 2 TR: 126.96.36.19907
- RTM: 188.8.131.5218
- August 24 2007 Hotfix Package: 184.108.40.20636
- SP1: 220.127.116.1119
If your installation isn't running and you can't access the CA site, check out the following links to learn about alternative means to find the current version number.