The food gorillas eat in the wild is different than in zoos. In the wild they eat plants, leaves, seeds, stems, fruit and termites (and often 'unintentionally') small insects; they're in the green food they eat.
In zoos (at least, in the zoos I visit in my country and in Belgium and Germany) they eat vegetables, grass, leaves and bark. They rarely eat fruit, although that is different for every zoo. The reason is that our fruit has sugar added to make it nice for us to eat; in fruit in the wild that's not the case. When I hear little kids talking about gorillas eating bananas, I tell them 'a banana is for a gorilla what an ice-cream is for you, not good'. Funny thing, often people (both young and old) say 'look, they're eating a banana' when they see a gorilla eating chicory
Most of the time a gorilla only gets fruit in a zoo when they need medicine. The keepers put that medicine in a piece of fruit and they take it without a problem. In various zoos I visit they do get fruits, only incidental or on a more regular base. Luckily many zoos decreased the number of fruit or even stopped.
I have seen gorillas eat a variety of vegetables. Some they prefer over others (of course). Big favourites are (red) bell peppers, tomatoes and carrots. They also eat: endive, courgette, cucumber, onions, fennel, leek, broccoli, cauliflower, cabbage, red beets and many other vegetables. I once saw that they gave the gorillas in Burgers' Zoo sauerkraut. Well, they were not interested!
Besides the vegetables they also (for each zoo it's different) eat branches with leaves, lucerne, seeds and especially for gorillas made kibble. It's especially very funny to see how they pick up small seeds with a lot of patience from the floor to eat it.
In zoos I visited I have seen gorillas eat a (hard)boiled egg. I also saw gorillas eat cooked rice and potatoes. Not so often by the way.
They scrape the bark of branches and eat that. Many years ago I heard someone saying it was a way of take care of their teeth. When I started my website I thought 'I'll look it up on the internet', but I couldn't find anything about. When, on 5 February 2016, I saw a 'gorilla expert' (zoologist in a Dutch zoo) I asked her about it. She told me that it's fiber-rich food, which (to my surprise) can be digested very well.