The title usually goes to A. S. Douglas, for the game he built alongside his 1952 Cambridge doctoral thesis on human-computer interaction.
The program was a version of noughts and crosses — tic-tac-toe — rendered on the memory display of an EDSAC computer. Players entered moves through the machine's switches rather than a keyboard or screen as we would recognise them, which makes it closer to a technical demonstration than a product.
Whether it counts as the "first" depends on your definition. Earlier experiments existed on other machines, and the question of what qualifies as a video game has never been settled. What is not in dispute is Douglas's place in the lineage: he was among the first to use a computer for something a person played for its own sake.