I think it is an elipsis of one of the very compositions of "alt" + Noun, like in "alter Freund", where "alt" is used in the sense "proven, tried". This is why I think that "Alter Schwede" (see @darios answer) is but one example, and not necessarily the sole root of "Alter".
Unlike in "alter Mann", where "alter" refers to the age, in "alter Freund" it rather refers to the enduring friendship. For example, if you would get friend with an 72 old, you would not call him "alter Freund" the next day. But you could call a young man of 25 "alter Freund" if you have been friends for several years.
So, that function of "alt" in "alter Freund" is a bit of an amplifier, like "proven, tried friend", sometimes with a humorous note:
A: "Eine Politesse wollte mir gestern einen Strafzettel verpassen, aber ich konnte sie noch überreden, es bleiben zu lassen."
B: "Alter Charmeuer!"
This also works in the negative:
A: "Ich war dermaßen besoffen, daß ich ins Bidet gekotzt habe."
B: "Du bist wirklich eine alte Sau!"
Note also that the formerly very popular western heroes of Karl May's novelles had names like "Old Shatterhand", "Old Surehand" etc. Here May transfers this usage of "alt" to his imaginary english speaking world.
Last but not least it must be noted that substantivation of adjectives is common, and so you may find the term "Alter" in speech that pre-dates current youth slang. Though, "Alter" and "Alte" referred to ones husband and wife like in:
Bist du beim Bier, so bleib dabei: Deine Alte schimpft um zehn genauso wie um zwei.
Needless to emphasize, it is very disrespectful to say:
Bringst du deine Alte mit?