In the Western World (Europe/Mediterranean), signing works of art goes back at least to Classical Antiquity, if not further. Pliny, in his Natural History written in the first century AD, writes about artists' signatures in his preface:
"I should like to be accepted on the same basis as those founders of the arts of painting and sculpture who, as you will find in my book, inscribed their completed works, even those we never tire of admiring, with a sort of provisional signature—Apelles faciebat, for instance, or Polyclitus faciebat: ‘Apelles has been at work on this’—as if art was something always in progress and incomplete; so that in the face of any criticisms the artist could still fall back on our forbearance as having intended to improve anything a work might leave to be desired, if only he had not been interrupted. There is a wealth of diffidence in their inscribing all their works as if these were just at their latest state, and as if fate had torn them away from work on each one. Not more than three works of art, I believe, are recorded as being inscribed as actually finished: fecit."
(Pliny the Elder, Naturalis Historia; English version quoted and translated is from Michael Baxandall, Giotto and the Orators: Humanist observers of painting in Italy and the discovery of pictorial composition 1350 – 1450 (1971), 64)
There are also examples of signatures on Greek pottery. Exekias, e.g., signed his vase featuring Achilles and Ajax playing a dice game (ca. 540-530 BC, Vatican Museum, Rome), with "ΕΧΣΕΚΙΑΣΕΠΟΙΕΣΕ" ("Exekias made me").
I think the earliest extant signature yet found in the Western tradition is from the 7th century BC, but I can't find the reference to it right now.
The question of artists' fame (and whether viewers knew a particular work was by a particular artist) is much more difficult to answer, and depends on a vast range of factors. E.g., in the period I study (medieval and Renaissance Italy) there are some sources indicating artists were known and appreciated, but many of them come from the sort of people who we expect to know and appreciate artists (i.e., patrons, humanist scholars, etc.). It's far less clear if your average citizen knew (or cared!) who was responsible for all the artwork on display.