Large switch statement bucketing system
First, I would replace the dictionary

var workoutsPerWeek = [Int: Int]()


by an array. A dictionary could be memory-saving if you have "few" keys in a "large range",
e.g. 1, 20, 300, 4000, as a "sparse-array" emulation. But that is not the case here:
The bucket numbers range from 0 to 9, so that an array is more appropriate,
easier to initialize, and easier to access (no forced unwraps needed).

It is unclear in your code how many entries are needed: You
initialize entries for 0...100, update entries for 0...9, and finally 
evaluate entries 0...10. If you want to collect the data for the last 10 weeks then it would be

var workoutsPerWeek = Array(repeating: 0, count: 10)


Now you can use the computed bucket number as an index into the array and
replace the switch statement by

let rawBucket = Int((startDateInterval - workoutTimeInterval) / numberOfSecondsInAWeek)
if rawBucket &gt;= 0 &amp;&amp; rawBucket &lt; workoutsPerWeek.count {
    workoutsPerWeek[rawBucket] += 1
}


The range check for the bucket number can also be done as

if workoutsPerWeek.indices.contains(rawBucket) { ... }


There are more things which can be improved: In

let workoutTimeInterval = Double((userWorkout.completionDate?.timeIntervalSinceNow)!)


the conversion to Double is not needed. And what if completionDate is nil?
Your code would crash in that case.

But my main point of criticism is how the bucket is computed. 
A day does not necessarily have 24 hours. In regions with daylight saving time,
a day can have 23 or 25 hours if the clocks are adjusted one hour back or forward.
Applied to your code: A week does not necessarily have 604,800 seconds.

The proper way to compute calendar differences is to use the Calendar methods
and DateComponents:

for userWorkout in userWorkouts {
    // Ensure that completionDate is set, otherwise ignore this entry
    guard let completionDate = userWorkout.completionDate else { continue }

    // Compute #of weeks between completionDate and startDate
    let weeksAgo = Calendar.current.dateComponents([.weekOfMonth], from: completionDate, to: startDate).weekOfMonth!

    // Update corresponding bucket
    if workoutsPerWeek.indices.contains(weeksAgo) {
        workoutsPerWeek[weeksAgo] += 1
    }
}


Finally, the calculation of the number of consecutive weeks where the goal has been reached can be simplified to

let numberOfGoodBuckets = workoutsPerWeek.prefix(while: { $0 &gt;= target }).count