When a child is born on Shabbat, the Berit is performed on Shabbat a week later, which is the child’s eighth day, as the Torah required performing a Berit on the child’s eighth day even when it falls on Shabbat. However, this Halacha applies only when it is certain that Shabbat is the child’s eighth day. In situations where this cannot be definitively ascertained, the Berit cannot be performed on Shabbat.
The most common example of such a case is that of an infant born during "Ben Ha’shemashot" – the period immediately after sunset – on Friday afternoon. Halacha treats the period of "Ben Ha’shemashot" as a period of "Safek" ("uncertainty"), as we are unsure whether to consider this period daytime or nighttime. Thus, if a child is born during "Ben Ha’shemashot" on Friday afternoon, it is uncertain whether he is considered to have been born on Friday, in which case the Berit should be performed the following Friday, or if he is considered to have been born on Shabbat, such that the Berit should be performed the next Shabbat. Therefore, in such a case, the Berit is delayed until Sunday.
In order to apply this Halacha practically, of course, we need to precisely define "Ben Ha’shemashot," and determine when it begins at ends. The accepted view is that of the Geonim, that the period of "Ben Ha’shemashot" begins right at sunset (as opposed to the famous view of Rabbenu Tam, who maintained that "Ben Ha’shemashot" actually begins later). It is clear, then, that a child born after sundown on Friday afternoon will not be circumcised the next Friday. The more difficult question, however, is for how long the period of "Ben Ha’shemashot" extends after sundown. The Gemara teaches that "Ben Ha’shemashot" extends for the time needed to walk three-quarters of a "Mil." It is generally accepted that the period needed to walk a "Mil" is 18 minutes, and thus the period of "Ben Ha’shemashot" extends for 13.5 minutes.
Intuitively, then, we would conclude that if a child is born 14 minutes after sunset on Friday afternoon, he is considered to have been born on Shabbat, such that the Berit should be performed the following Shabbat.
In truth, however, this is not the case. Hacham Ovadia Yosef noted that according to some opinions, the time of walking a "Mil" is actually 24 minutes, and not 18 minutes, such that the period of "Ben Ha’shemashot" extends for 18 minutes, not 13.5. According to another view, "Ben Ha’shemashot" extends for one minute longer – 19 minutes – and, our calculation of the moment of sunset might be imprecise, so an additional minute should be added. In practice, therefore, Hacham Ovadia maintained that a child born on Friday evening should be circumcised the following Shabbat only if he was born at least 20 minutes after sundown. If he was born within 20 minutes after sundown, the Berit Mila must be delayed until Sunday.
Hacham Bension Abba Shaul (Israel, 1924-1998) disagreed, observing that there is still some light in the sky 20 minutes after sundown. In his view, the baby needs to be born at least 27 minutes after sundown on Friday in order for the Berit to be performed on Shabbat.
Further complicating matters is the fact that this entire discussion applies only in Israel. Here in the United States, many Poskim were of the opinion that the period of "Ben Ha’shemashot" extends for a longer duration of time than in Eretz Yisrael. Some maintain that it extends for 45 minutes, and some claim that it extends as long as 72 minutes. It is therefore recommended that in such a case, when an infant is born shortly after sundown on Friday afternoon, one should consult a competent Rabbi for guidance.
Summary: A child born on Shabbat is circumcised the following Shabbat, but a child born shortly after sundown on Friday afternoon, during the period which cannot be definitively considered nighttime, is circumcised on Sunday. As different opinions exist as to the length of this period, a Rabbi should be consulted for guidance in such a case.