ffmpeg -i first_gif.gif -i second_gif.gif -filter_complex "[0:v] [1:v] concat=v=1 [v]" -map "[v]" both_gifs.mp4
Where -i <filename> tells where the gif file is and the "[0:v] [1:v]" bit tells which order you have the files.
ffmpeg -i first_gif.gif -i second_gif.gif -filter_complex "[0:v] [1:v] concat=v=1 [v]" -map "[v]" both_gifs.mp4
Where -i <filename> tells where the gif file is and the "[0:v] [1:v]" bit tells which order you have the files.