Not a good mix, since Dwarf Gouramis get about 2.5 inches long at best, and Tinfoil Barbs can exceed 14 inches. While not aggressive per se, large Tinfoils eating would probably blow the Dwarf Gourami out of the water. How big is your tank?
Besides the gourmai being at the very least intimidated by ~40cm 6+ Tinfoil Barbs in a 8-foot plus tank (I'd be happier seeing them in a 12x3x3 minimum with group of 10+), I think you would struggle to spot the gourami in such a massive tank that is needed for large schooling and skittish fish.