You have to enclose it with quotes "
and escape the space:
set shell=\"C:\Program\ Files\Git\gi-bash.exe\"
Here is what the documentation says:
:help 'shell'
'shell' 'sh' string (default $SHELL or "sh", Win32: "cmd.exe")
global
...
If the name of the shell contains a space, you need to enclose it in
quotes and escape the space. Example with quotes: >
:set shell=\"c:\program\ files\unix\sh.exe\"\ -f
< Note the backslash before each quote (to avoid starting a comment) and
each space (to avoid ending the option value). Also note that the
"-f" is not inside the quotes, because it is not part of the command
name. Vim automagically recognizes the backslashes that are path
separators.
Example with escaped space (Vim will do this when initializing the
option from $SHELL): >
:set shell=/bin/with\\\ space/sh
< The resulting value of 'shell' is "/bin/with\ space/sh", two
backslashes are consumed by `:set`.
...