Green’s Dictionary of Slang

ballgame n.

[SE ballgame, a sporting event, esp. a baseball game]

[1930s+] (orig. US) a state of affairs, a situation.

In phrases

end of the ballgame (n.) [20C+] (US)

the definitive conclusion to something.

that’s the ballgame (also there goes the ballgame)

[1940s+] (US) a phr. meaning that’s it, no arguments accepted, forget it.

whole new ballgame (n.) (also different ballgame)

[1960s+] (orig. US) a radically new situation (to which one will be forced to adapt).