Months on the Jewish calendar are based on the lunar cycle, and are therefore made up of either 29 or 30 days. While today the calendar is set based on rules and calculations from the time of the amoraim, during Temple times the beginning of the month was dependant on witnesses who would testify that they saw the new moon. The tradition that has Diaspora Jews keeping an extra day of Yom Tov stems from the inability of the messengers in those days to bring this information in time for the beginning of the holiday.
Rosh HaShana is an interesting holiday as far as Jewish law is concerned. While the Torah commands to keep the holiday – which includes the restrictions of a normal Yom Tov – on the first day of the month of Tishrei, already in the time of the Temple it was often celebrated for two days, since even in Jerusalem where the Sanhedrin sat, they could not be sure when the new moon would be seen. Were the witnesses to come first thing in the morning on the 30th day of Elul, that day would be established as the single day of Rosh HaShana. If they were to come late in the day – or not at all – then the next day would be announced as Rosh HaShana, as well.
The Mishna (39a) relates to this situation as it affects the rules of eiruvin. Can a person who is concerned that Rosh HaShana will be two days, arrange an eiruv tehumin in one direction for the first day and in another direction for the second day? Rabbi Yehuda rules that each day of Rosh HaShana would be considered a separate holiday, so separate eiruvin could be made. The hakhamim (identified in the Gemara as Rabbi Yose) argue that the two days must be considered kedusha ahat – as sharing “one holiness” – and the eiruv can only be made in one direction for both days.
Rabbi Yose argues that the case where the witnesses came late in the day, after we have already determined that the first day will not really be Rosh HaShana, and yet both days are declared Rosh HaShana, proves that the two days share, in effect a single kedusha. Those who argue with him say that the two days do not have equal holiness, as only one of the days is really Yom Tov. We treat both of them as having kedusha so that people will not come to treat the day lightly – d’lo le-zilzulei bei.
The traditional explanation is that in the case when the witnesses arrive in court late in the day, their testimony is not accepted and the “true” day of Rosh HaShana is established as the second day. We are concerned that in future years people will not take the first day seriously, so we announce both days as Rosh HaShana. The Ra’avad understands this Gemara in the opposite way. According to him, since there were witnesses who saw the new moon on the first day and arrived in the court to testify, really the first day is the “true” Rosh HaShana. The Sages added a second day to accommodate the witnesses whose testimony is accepted on that day.