I'm not a teacher or grammarian so I'm not sure about the formal grammar.
I think of it as a shortening of "a prank which has gone wrong." And I think of "wrong" as short for "in the wrong direction." If you try to do A, and instead B happens, and B is bad, a mess, a catastrophe--then A "has gone wrong."
We can think of a scale: something "went well," or "didn't go well," or, worst of all, "went wrong."
"How did your camping trip go?"
"It went well, we had a great time."
"How did your camping trip go?"
"It didn't go well, it rained a lot and there were swarms of mosquitoes."
"How did your camping trip go?"
"Everything went wrong. The air mattress went flat, we forgot to bring propane for the camp stove and couldn't cook anything, and the car broke down."