This is actually a straightforward problem about unit conversions and careful manipulation based on the functional forms of the potential we want.
To go from the Improper Torsion Parameters to the Improper Dihedral in GROMACS, simply do the following transformation on the amplitude: $ampl\times 4.184\times n/2$$\textrm{ampl}\times 4.184\times n/2~$ where 4.184 is the unit conversion factor from kcal to kJ, and $n$ is the number of times that torsion is repeated in the table.
To go from the Torsional Angle Parameters to the GROMACS itp file, make the changes as per the ones given in the GROMACS page, equations 33: https://manual.gromacs.org/documentation/2020-beta3/reference-manual/functions/bonded-interactions.htmlGROMACS page, equations 33.:
\begin{split}\displaystyle \begin{array}{rcl} \displaystyle C_0&=&F_2 + \frac{1}{2} (F_1 + F_3)\\ \displaystyle C_1&=&\frac{1}{2} (- F_1 + 3 \, F_3)\\ \displaystyle C_2&=& -F_2 + 4 \, F_4\\ \displaystyle C_3&=&-2 \, F_3\\ \displaystyle C_4&=&-4 \, F_4\\ \displaystyle C_5&=&0 \end{array}\end{split}\begin{split}\displaystyle \begin{eqnarray} \displaystyle C_0&=&F_2 + \frac{1}{2} (F_1 + F_3)\tag{1}\\ \displaystyle C_1&=&\frac{1}{2} (- F_1 + 3 \, F_3)\tag{2}\\ \displaystyle C_2&=& -F_2 + 4 \, F_4\tag{3}\\ \displaystyle C_3&=&-2 \, F_3\tag{4}\\ \displaystyle C_4&=&-4 \, F_4\tag{5}\\ \displaystyle C_5&=&0\tag{6}. \end{eqnarray}\end{split}