"Yesterday I went to the doctor."
Translation:Ich bin gestern zum Arzt gegangen.
It's theoretically possible but sounds oddly specific to me -- as if you said, "I went to the female doctor yesterday".
Usually, I'd use zum Arzt gehen with Arzt as a gender-neutral "job" rather than necessarily with a particular doctor in mind -- a bit like "reading the newspaper" or "listening to the radio" in English, where "the newspaper, the radio" refer to the medium in an abstract way and not necessarily to a specific publication or channel.
Still, I've added versions with zur Ärztin, for the case where you are going to a specific doctor whom you had been speaking about previously.
- The past participle of gehen is gegangen, not gegannen
- Gestern would not be set off by a comma but would be in the first position of the sentence if you put it there, followed immediately by the verb which has to be in the second position.
Gestern bin ich zum Arzt gegangen is possible (and accepted).