It wasn't Enders Game, but it was similar. A boy is living in a not quite dystopic city in the future, and begins to play something like an arcade game, that is about shooting aliens and other players in a ship. Eventually he becomes well known for being good at the game and joins a competition for it. Winners of the competition are conscripted into an army. The boy wins along with a female friend (I think?) After that I can't recall.
It would seem it was Armada, by Ernest Cline. Thanks, drewbenn.
Zack Lightman the school aged protagonist of Armada, is recruited into the Earth Defense Alliance (EDA) after it is revelaed to the world that the FPS space fighter game (Armada) he's been playing is in fact real, and the mission runs he completes are remote control attacks on an alien base on Europa.
The best players of the game based on the in game scoreboard/league system are gathered together, where he meets a girl(Debbie I think), who happens to be one of the top players of the Ground combat portion of the game. Romance ensues.
The setting is not quite dystopian, but the protagonist is from a modest to low income, single parent background and his life so far could be summed up as not the greatest.
This matches all of the points raised in the original question.
Might be "The Last Starfighter". The link goes to the movie, but there was a novel by the same name made from the movie.
Alex Rogan is a teenager who lives in a trailer park with his mother and brother. He is the handy man of the trailer park - he helps the other folks keep their plumbing, and electricity, and air conditioners running. Since the trailer park is rather run down and is located in a desert, it could easily be taken for a dystopic future.
In his spare time he plays the video game "Starfighter." The game turns out to have been placed on Earth in order to help a bunch of aliens find pilots capable of flying their ships in order to beat off attacks by an intergalactic bad guy.
He ends up using the last remaining starfighter to defeat the alien armada.
His girlfriend does in fact join him on the alien planet, but only after he has defeated the bad guys.
Although Jorge has indicated they have found their answer, I feel obliged to elaborate on my comment above. The Roar by Emma Clayton checks off most to all the boxes. It has a male protagonist, Mika, living in a fairly dystopic multi-leveled city with food grown from chemicals and mold, insulated from a biological plague by a huge wall. Mika begins playing an arcade game involving simulated "pod fighters" and he has a partner who acts as a gunner, Audrey, a girl who was born with no eyes (one of many biological mutations seen in the books) and "sees" by virtue of implants. Those who do well in the games are brainwashed to act as soldiers for threats outside the wall. Mika manages to escape and meet up with his twin sister, who everybody but he (and the reader who has seen her accounts interspersed in the book) thought was dead.
There is a sequel, The Whisper.