This isn’t just a grammar question: the examiner is also looking to see that you are using the correct tense for the situation that the first speaker established.
The present perfect tense tells us about how things got to be how they are now
The use of the present perfect (“I have gone”) says that an action is in a “completed” state. By using this tense, you are not only saying that the action was completed, you are also saying that the way things were at the end of that completed action is the way things still are - nothing has happened since to undo the action.
- correct: I have gone to the dentist.
This tells me that you have completed the action of “to go to the dentist”. So, where are you now? You are still at the dentist. Until you tell me something else about your location, I can only assume you are still at the dentist.
But how about this one:
- correct: I went to the dentist
This only says that, at some point in the past, you performed the action “to go to the dentist”, but it tells me nothing about what happened afterwards. It is possible that you are still at the dentist, but it’s also possible that you are not.
- correct: I went to the dentist this afternoon
More information has become available: “this afternoon” places “went to the dentist” at a specific point in time. However, it still doesn’t tell me anything about where you are now. All I know is:
- You performed the action “to go to the dentist”
- It happened this afternoon.
So, what’s wrong with your answer?
- incorrect: I have gone to the dentist this afternoon
The problem with this in the context of your exam question is that with the choice of tense, you are actually saying three things:
- You completed the action “to go to the dentist”
- You are still at the dentist
- It is still afternoon
That third one might surprise you, but remember that the present perfect represents an action that began in the past, has been completed.. and has not since been undone or contradicted. So for the sentence to be logically correct, “at the dentist this afternoon” must be the speaker’s current situation.
Your proposed answer is grammatically correct, but it is not relevant to the exchange in the question. In a situation where one speaker has told you it is late in the evening, replying with a statement that implies that it is the afternoon makes no sense.
If the conversation was taking place at 3pm, over the phone, while you were still at the dentist, then your answer would be okay; but from the other speaker’s initial statement this is clearly not the case.
On the other hand, using the other option, the past imperfect (“went”), makes no claims about where you are now or what time it is, so it provides information that is relevant to the conversation and does not contradict what was said before, and is thus the correct answer.