According to Mark, the earliest of the gospels, in 14:26-31, Jesus foretells the denial of Peter after the Last Supper.
After He had given His disciples bread and wine saying "Take, eat: this is my body." and "This is my blood of the new testament, which is shed for many." they sung a hymn, went to the Mount of Olives and before arriving at the Garden of Gethsemane Jesus said to Peter "Verily I say unto thee, That this day, even in this night, before the cock crow twice, thou shalt deny me thrice."
Matthew 26:30-35 also places the prediction on the Mount of Olives, while Luke 22:31-34 and John 13:36-38 set it during the Last Supper.