If you mean the food (rather than the dance or music), we don't know. We know that a diverse range of salsa was eaten (and sold in markets) in Mexico when the Spanish first arrived. One early description, by Bernardino de SahagĂșn in the 16th century, was:
He sells foods sauces, hot sauces; fried [food], olla-cooked [food], juices, sauces of juices, shredded [food] with chile, with squash seeds, with tomatoes, with smoked chile, with hot chile, with yellow chile, with mild red chile sauce, yellow chile sauce, hot chile sauce, with "bird excrement" sauce, sauce of smoked chile, heated [sauces], bean sauce; [he sells] toasted beans, cooked beans, mushroom sauce, sauce of small squash, sauce of large tomatoes, sauce of ordinary tomatoes, sauce of various kinds of sour herbs, avocado sauce.
Earlier than this, we don't have good historical evidence. However, one of the main traditional tools for salsa-making, the molcajete (i.e., mortar), was in use in Mexico by 500BC. By this time, all of the major ingredients seen in later salsas (e.g., tomato, chilli, tomatillo) were present, and it is likely that salsa was already being made. The tomato and chilli had been domesticated thousands of years earlier (e.g., the tomato was probably domesticated about 7,000 years ago), and it is quite possible that salsa was made long before 500BC. While 500BC is approximately when the oldest known pottery mortars appeared in Mexico, such mortars are not a prerequisite for salsa-making. For example, wooden mortars can be used for the same purpose.
To summarise,
Salsa was certainly invented before 1500AD.
Salsa was probably being made about 500BC.
Salsa might have been made thousands of years before that, possibly as long ago as 5,000BC.