The easiest way to answer your teacher (and eliminate your quandary) is to simply say:
Grapes are my favorite fruit.
However, that's merely a way to dodge your question, not confront it head-on. What should we do when we start our answer with:
My favorite fruit...
First, let's pick a different fruit. One way to construct the sentence is to use an article:
My favorite fruit is the nectarine.
My favorite fruit is a plum.
Alternatively, we could use no article, but then we need to decide what to do with the verb. As a discussion on Quora says:
As “fruit” is both a countable and uncountable noun, it can be singular or plural. So while it is a choice between “My favorite fruit is apples,” or “My favorite fruit is apple,” the only correct choice is “My favorite fruit is apples” because you would need some kind of determiner such as a number or article to precede the singular object.
This is made even trickier by the fact that we seldom refer to a grape in the singular but usually talk about grapes in the plural.
So, if I had to start with, "My favorite...," I would probably say:
My favorite fruit is grapes.
It's not ungrammatical, although it might sound ungrammatical because grapes sounds like a plural noun, right next to the singular is.
Evidently, this construct has vexed others before. (See this or this conversation on Word Reference, or this poll on UE, for example.)
Perhaps comedian Demetri Martin said it best:
My favorite fruit is grapes. Because with grapes, you always get another chance.