Albania, fresh from a 1-1 friendly draw in France on Friday, impressed again with their defensive stability and quick counter-attacks.
But they were undone eight minutes from time when Okaka, introduced as a 65th-minute substitute for Sebastian Giovinco, nodded in from a corner.
The match, moved from Parma to Genoa to raise money after devastating floods hit the area, was played at a high tempo and saw both sides create numerous chances.
Composure was lacking, though, and the match seemed to be headeing for a goalless draw - Albania's best chance coming when Sokol Cikalleshi rattled the crossbar from distance in the 38th minute.
But Sampdoria forward Okaka had other ideas, with his glancing header at the near post, which took a touch off Albania substitute Hamdi Salihi, proving the difference.
The result is Italy's fifth win in six matches under new coach Antonio Conte.
Conte made several changes, as Mattia Destro and Giovinco started up front, while Torino defender Emiliano Moretti became Italy's oldest debutant at the age of 33.
Unsurprisingly, Albania were unchanged after their excellent effort in France, but they were on the back foot in the early stages.
Atletico Madrid's Alessio Cerci - who had his shirt ripped after storming past two defenders on the right in the first three minutes - forced a smart save from Etrit Berisha in the 13th minute.
Cerci continued to get in and behind the Albania defence and cause problems, while Destro fired just wide on the half-hour mark.
Giovinco also went close, with his header forcing a fingertip save from Berisha, but Italy were nearly caught out at the other end after a sloppy Lorenzo De Silvestri error.
De Silvestri conceded possession to let Cikalleshi in and he surged forward before firing against the crossbar from 30 yards in stunning fashion.
Albania almost fashioned the opener out of the rebound, but Mergim Mavraj, scorer against France, could only nod wide.
Berisha was alert to keep out Andrea Bertolacci and Cerci before the break and Giovinco shot straight at him five minutes after the resumption to end a neat move.
A routine back pass nearly led to Albania opening the scoring, after goalkeeper Salvatore Sirigu took a heavy touch, but scrambled defending allowed Italy to eventually clear their lines.
The frantic nature of the contest continued, as Destro shot wide when sent through on goal, and Ermir Lenjani tested Sirigu at the other end.
Berisha then made an outstanding stop to keep out Okaka's effort on the turn.
The flow of the match was interrupted by multiple substitutions and pitch invasions, but there was still time for Okaka to net the winner, with Italy only denied a second by Giacomo Bonaventura's sloppy finish in stoppage time.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.