The papal bull "Inter Gravissimas", 1582, defined how the switch from the Julian calendar to the new Gregorian calendar was going to be carried out. There was no debate on when to celebrate Sunday, because the bull specified it, though you had to infer it from what was stated: the bull preserved the sequence of days of Sun - Mon - Tue - Wed - Thu - Fri - Sat.
It specified that 5 October to 14 October (inclusive) were going to be deleted (so the calendar was going to go from 4 October to 15 October). 4 October was Thursday, so without the change 4+7=11 October would be next Thursday, so the next Sundays would have been 14 October (not existing that year) and then 21 October. But the bull said explicitly that 17 October would be celebrated as the 18th Sunday after Pentecost. From that, you can infer that the weekdays were going to be preserved: it was going to go Thursday 4 October (Julian, before the change) -> Friday 15 October -> Saturday 16 October -> Sunday 17 October.
(Edit: removed the dominical letter discussion. I got a detail wrong, it didn't directly illustrate anything about the day of the week, and the paragraph above suffices to explain it.)
Of more interest: the Catholic Church has and had many fixed feast days: on this fixed date, celebrate such-and-so saint(s). Some feasts would have landed on days that weren't going to exist in 1582. So the bull also specifies what days would be used to celebrate these feasts. Basically, he piled up the missing feasts on 15-18 October, mostly on the 15th, and then going back to the normal calendar. (E.g., the 15th got SS. Dionysius, Rusticus, Eleutherius, Mark the pope, Sergius, Bacchus, Marcellus, and Apuleius; the 18th just got S. Luke the Evangelist.) I saw somewhere, but can't find it now, that the deleted stretch of October was chosen because it was light on feast days, and because it was in "Ordinary Time", meaning it wasn't in a fixed-length special season like Lent, Eastertide, or Advent. (Shorten Lent from 40 days?! Good Lord!)
Edit: did he skip a Sunday in the number of "Nth Sunday after Pentecost"? Easter was apparently 15 April 1582, so Pentecost is 7*7 days later, so 3 June, so 30 September is the 17th Sunday after Pentecost ... so no, he didn't skip counting a Sunday, he dropped the last one of the year, the one just before the first Sunday of Advent. The number of Sundays after Pentecost (meaning before Advent) varies significantly anyway based on the date of Easter.