(Leetcode) Freedom Trail
It was hard to understand, how your code works, so I started by changing variable names to more meaningful form, also unnecessary +1, -1 operation were fixed (i - 1, 1, len(key) + 1, etc):

class Solution:
    def findRotateSteps(self, ring, key):
        cumulative_lens = [[min(i, len(ring) - i) for i in range(len(ring))]]
        cumulative_lens.extend([[float('inf')] * len(ring) for _ in range(len(key))])

        for key_num in range(len(key)):
            for new_ring_pos in range(len(ring)):
                if ring[new_ring_pos] != key[key_num]:
                    continue

                min_sum_len = float('inf')

                for prev_ring_pos in range(len(ring)):
                    prev_ltr_sum_len = cumulative_lens[key_num][prev_ring_pos]              

                    if prev_ltr_sum_len == float('inf'):
                        continue

                    clk_w_len = abs(prev_ring_pos - new_ring_pos)
                    a_clk_len = len(ring) - clk_w_len

                    new_sum_len = min(clk_w_len, a_clk_len) + prev_ltr_sum_len + 1
                    min_sum_len = min(min_sum_len, new_sum_len)

                cumulative_lens[key_num + 1][new_ring_pos] = min_sum_len

        return min(cumulative_lens[-1])


Now, it is possible to read the code like a story. The cause of low performance is how you store and search visited letter lens (cumulative_lens). You keep them in the list, thus you need to iterate through all items to find not inf ones for each key value: 

for prev_ring_pos in range(len(ring)):
    prev_ltr_sum_len = cumulative_lens[key_num][prev_ring_pos]              

    if prev_ltr_sum_len == float('inf'):
        continue


Example: you have 100 letters in the ring and 10 letters in the key. You found all possible lengths in the ring (there are 3 only) to the first key's letter and move to the second. It will be good to take just needed 3 in the next key's letter processing, not checking others 97 items, which are 'infs'. It can be done by storing ring letters in  the dictionary - the Python's hash table structure, like this: 

letter_indexes = {
    'a' : [first a's index, second a's index],
    'c' : [first c's index, second c's index, third c's index],
    etc
}


In this case, we can get the list of the needed letter positions by doing letter_indexes[letter], not messing with the others. I wrote my own solution, see it in the end.

Also, I did some refactoring of your code:


changed multiple len(ring) calls to the ln_ring variable - no performance gain, but more readable.
changed

for key_num in range(len(key)):
    for new_ring_pos in range(len(ring)):
        if ring[new_ring_pos] != key[key_num]:


like constructions to more pythonic:

for key_num, key_ltr in enumerate(key):
    for new_ring_pos, ring_ltr in enumerate(ring):
        if key_ltr != ring_ltr:



Result:

class Solution:
    def findRotateSteps(self, ring, key):
        ln_ring = len(ring)

        cumulative_lens = [[min(i, ln_ring - i) for i in range(ln_ring)]]
        cumulative_lens.extend([[float('inf')] * ln_ring for _ in range(len(key))])

        for key_num, key_ltr in enumerate(key):
            for new_ring_pos, ring_ltr in enumerate(ring):
                if key_ltr != ring_ltr:
                    continue

                min_sum_len = float('inf')

                for prev_ring_pos, prev_ltr_sum_len in enumerate(cumulative_lens[key_num]):

                    if prev_ltr_sum_len == float('inf'):
                        continue

                    clk_w_len = abs(prev_ring_pos - new_ring_pos)
                    a_clk_len = ln_ring - clk_w_len

                    new_sum_len = min(clk_w_len, a_clk_len) + prev_ltr_sum_len + 1
                    min_sum_len = min(min_sum_len, new_sum_len)

                cumulative_lens[key_num + 1][new_ring_pos] = min_sum_len

        return min(cumulative_lens[-1])




My solution:

It works similar to your, but is much faster due to dictionary usage.

class Solution:
    def findRotateSteps(self, ring, key):
        # the 'prev_ltr' variable should have the start value in the
        # beginning, so the '#' character is choosed
        # It can be changed to any character different from key's content
        # In other words, it is like '-1' item with 0 index.
        ltr_indexes = {'#' : [0]}

        for idx, ltr in enumerate(ring):
            ltr_indexes.setdefault(ltr, []).append(idx)

        ln = len(ring)
        l_lens = [0] * ln

        prev_ltr = '#'
        for ltr in key:
            for pos in ltr_indexes[ltr]:    
                all_variants = []

                for prev_pos in ltr_indexes[prev_ltr]:  
                    clk_w = abs(prev_pos - pos) 
                    a_clk = ln - clk_w 
                    all_variants.append(min(clk_w, a_clk) + l_lens[prev_pos])

                l_lens[pos] = min(all_variants)

            prev_ltr = ltr

        return min(l_lens[pos] for pos in ltr_indexes[ltr]) + len(key)