How was it wired before?
I am only guessing, but I think the bare ground wire going to the ground was some attempt at bonding the metal box.
If the 12/2 yellow wire has a ground, and it is properly grounded back at the source panel, then connect that ground and the hot and neutral to the GFCI...