I had the same question (I am using vim 8.2) and a google search brought me here. I searched vim help for g:terminal_ansi_colors
and made a list as they suggested of rgb values for gruvbox using the neutral and bright colors listed here: https://github.com/morhetz/gruvbox-contrib/blob/master/color.table. Then I searched more and found you need to set highlight Terminal guibg=
and same for guifg
to have a gruvbox background. This code in vimrc gave me a nice gruvbox themed terminal:
let g:terminal_ansi_colors = [
\'#282828', '#CC241D', '#98971A', '#D79921',
\'#458588', '#B16286', '#689D6A', '#D65D0E',
\'#fb4934', '#b8bb26', '#fabd2f', '#83a598',
\'#d3869b', '#8ec07c', '#fe8019', '#FBF1C7' ]
highlight Terminal guibg='#282828'
highlight Terminal guifg='#ebdbb2'