"L'ail donne un bon goût aux pommes de terre."
Translation:Garlic makes potatoes taste good.
Your English is not natural. You would either say "Garlic makes potatoes taste good." (the most natural sentence), or "Garlic gives the potatoes a good/nice taste."
Which would change taste to a noun, not a verb, and good to an adjective, rather than an adverb.
I wrote "Garlic gives a nice taste to potatoes" and got it wrong, which I think is incorrect.