Anything you want to move together needs to be linked. For example, I had about 75 subtitles on a timeline where each is only meaningful to a particular clip, just as the audio must be in the correct place. When I did as you did and cut a section out early in the timeline, used the delete gaps command, and immediately said, “OH $h!t” Quickly did and undo then linked the subtitles to the video and audio. I normally do all my editing before adding the extras, but it’s when you are almost done and find that spot that just doesn’t work that must be fixed that causes all the grief.
When you click on a video clip that also has audio in the timeline, the audio also highlights because they are linked. If you then right click the highlighted clips, at the very bottom of the menu that pops up you will see “Link Clips” with a check mark. If you uncheck that check mark you will separate the audio from the video. Conversely, if you want to link a new audio clip to that video clip you can lasso both clips, and when they are highlighted, right click and enable the check mark on the Link Clips.
To add my subtitles to my linked video and audio clips, I also lasso the corresponding subtitle clip, then right click and check mark the Link Clips. Essentially anything you link together will move together. Depending on how complicated your timeline is, it can either be rather simple or a lot of work.