"identical, equal; unchanging; one in substance or general character," from Proto-Germanic *samaz "same" (source also of Old Saxon, Old High German, Gothic sama, Old High German samant, German samt "together, with," Gothic samana "together," Dutch zamelen "to collect," German zusammen "together"), from PIE *samos "same," from suffixed form of root *sem- (1) "one; as one, together with."
Old English seems to have lost the adjective except in the adverbial phrase swa same "the same as" (literally "so same"). But the word that emerged in Middle English as "the ordinary adjectival pronominal designation of identity" [OED] is considered to be more likely (or mostly) from the Old Norse cognate same, samr "same." In its revival it replaced synonymous ilk.
As a pronoun, "the person or thing just mentioned," from c. 1300. In Middle English also a verb and an adjective, "together, mutually" (as in comen same "gather together, unite," kissen same "embrace one another").
Colloquial phrase same here "the same thing applies to me" as an exclamation of agreement is from 1895. All the same is from 1803 as "nevertheless, in spite of what has been mentioned." Same difference, a curious way to say "not different; equal," is attested from 1945. Often expanded for emphasis: ilk-same (mid-13c.); the self-same (early 15c.); one and the same is in Wyclif (late 14c.), translating Latin unus atque idem.