A brute force approach would be,
Say you want to join along x-axis
Step-1: Shift gro2 by box length (x length) of gro1 one by gmx trjconv
gmx trjconv -f gro2 -trans xlength1 0.0 0.0 -o new_gro2
** Use slightly large x-length to avoid overlap
Step-2: Now you need to put the contents of two files together. Remove the last line of gro1, and first two lines of gro2. append gro2 into gro1 (e.g. cat gro1 new_gro2 > new_gro). And adjust total number of atoms
Step-3: Fix serial numbers with gmx editconf
gmx editconf -f new_gro -o new_gro_fixed
adjust new box length in x-direction in the new_gro_fixed. Which will be xlength1 + xlength2 + offset
There might be a more smarter way to do this, above one is a dirty way to accomplish the job.
Cheers,
Masrul