Ok, I'll show you a simple way to do this.
Create a document 600px wide and 200px height.
Fill with white.
Crate a new layer.
Choose you text tool and type (whatever you want) a word in the center.
Do use something different than I did for now.
I'm going to use solid colors for this next part for ease, however, these next layers would be the patterns you see flashing in your example.
Create a new layer and fill it with blue.
Right click the "blue" layer and select create clipping mask or hover your cursor between the two layers while holding down the alt/option key, you will see the cursor turn into a box with a black angled arrow pointing down, then click.
You should now have blue colored text....
Create a new layer and fill it with pink.
Right click the "pink" layer and select create clipping mask or hover your cursor between the two layers while holding down the alt/option key, you will see the cursor turn into a box with a black angled arrow pointing down, then click.
You should now have pink colored text....
Create a new layer and fill it with red.
Right click the "red" layer and select create clipping mask or hover your cursor between the two layers while holding down the alt/option key, you will see the cursor turn into a box with a black angled arrow pointing down, then click.
You should now have red colored text....
This is what your layers panel should look like...
Next, you need turn off red and pink layers leaving just the blue.
Open your timeline panel. Go to WINDOW > TIMELINE.
In the timeline choose Create Frame Animation. Click on this.
You should now have one frame in your timeline. White BG with blue letters.
Click the "Duplicate selected frames" icon in the timeline controls. This will duplicate the first frame.
Go to your layers panel and turn off the blue layer and turn on the pink layer.
You should now have two frames in your timeline. First, White BG with blue letters. Second, White BG with pink letters.
Click the "Duplicate selected frames" icon in the timeline controls. This will duplicate the second frame.
Go to your layers panel and turn off the pink layer and turn on the red layer.
You should now have three frames in your timeline. First, White BG with blue letters. Second, White BG with pink letters. Third, White BG with red letters.
Almost done! Highlight the first frame in the timeline, hold the shift key and than click on the third frame, this should have then all selected. Click on the down arrow button on one of the selected frames so we can change the delay time. Set to 0.5 secs.
Set your looping option to forever.
Then click the play button. You should see the letters flashing blue, pink, red.
Go to FILE > SAVE FOR WEB
Select GIF, and forever under looping options.
Should look like this.
The lesson here is that we substituted solid colors for the different BG's flashing in your example.
Using this method allows you to add as many clipped images to the gif as you please.
Good luck!
Here is the exact same process using different clipped images.
Layers panel..