grit = dirt or sand. A book is gritty if it shows some of the "dirty" side of things. For example, a movie about Hollywood can show just the glamour, or it can show things like actors who cannot find work and have to work as prostitutes. The second movie is gritty.
Sophisticated means looking at things in a complicated or intelligent or very cultured way. Someone who thinks McDonalds is the best food ever is not sophisticated. A book that says "Hitler was bad and people who voted for him" is not very sophisticated. A book that explains why people who were very normal, nice persons decided to vote for Hitler, and thought he was the best choice, is more sophisticated.