Kodjia had squandered a golden opportunity to give Steve Bruce’s side the lead at Loftus Road, as his spot kick was denied by Alex Smithies, who had an excellent game in the hosts’ goal.
But the 27-year-old Ivorian made amends with 15 minutes remaining, smashing a low effort home to hand Villa only their second away win since the start of last season.
Both teams traded blows early on, as Alan Hutton’s fourth-minute effort was deflected wide, while up the other end Conor Washington had the first shot on target saved by recalled stopper Mark Bunn two minutes later.
The first real chance arrived on eight minutes as a brilliant ball from Grant Hall split the Villa defence, and Pawel Wszolek’s attempt was smothered by Bunn.
Both sides then saw penalty shouts waved away, as first Washington went down under the challenge of Jordan Amavi, before Gary Gardner was bundled over by Joel Lynch six minutes later.
But referee Geoff Eltringham had no choice but to point to the spot on the half-hour mark when Villa’s Kodjia robbed Wszolek in the box, and the QPR winger hauled him to the ground.
Kodjia’s limp penalty however was saved by Smithies – who has now kept out five of the last seven penalties he has faced in the Championship – down to his left, and Ross McCormack somehow put his follow-up attempt wide.
Villa were still in the ascendancy however, and after both Gardner and Kodjia could not get anything on Amavi’s brilliant ball from the left, there was still time before the break for Gardner to have a long-range effort punched away awkwardly by Smithies.
There was more urgency about QPR immediately after half-time, but still the hosts were unable to create many chances and Villa again began to build up a head of steam.
Smithies was called into action twice in two minutes, producing almost identical saves at full stretch to his right to deny both Kodjia and Leandro Bacuna.
Ian Holloway began to make changes to try and turn the game in QPR’s favour, and replacement Olamide Shodipo almost made an immediate impact on 62 minutes when his snap shot was blocked well by Baker.
Perch’s looping header drifted wide eight minutes later, but a goal was coming and it arrived with a quarter of an hour left on the clock.
Kodjia had terrorised the QPR defence all afternoon, and he finally got his reward as he rolled his maker from a throw in and drilled a shot underneath Smithies.
Replacement Jamie Mackie fired wide from a tight angle late on, but Villa held out to record their seventh win of the campaign.