Ante Rebic's superb 13th-minute opener appeared to put Milan on course for a routine win, but they made heavy weather of things thereafter.
Former Milan loanee Mattia Destro levelled before half-time and the Rossoneri required an own goal from Gianluca Scamacca to claim maximum points.
Inter can stretch its lead at the top back to 11 points by beating Napoli later on Monday (AEST), but Milan's slim hopes are still alive, while this result is another step towards making sure of Champions League qualification.
Genoa goalkeeper Mattia Perin had not been tested in the opening 12 minutes but he was left with no chance when Rebic unleashed a stunning volley on the turn to find the bottom-right corner in style after the visitors failed to clear having initially blocked Theo Hernandez's effort from a free-kick.
But Milan was unable to build on their lead and saw it eradicated by an excellent header from Destro eight minutes before half-time as he lost his marker to meet Miha Zajc's corner.
Rebic spurned a golden chance to restore Milan's advantage but could only blaze over from point-blank range after excellent work from Pierre Kalulu.
Marko Pjaca threatened to complete the turnaround for Genoa as he came off the bench and shot narrowly wide and Simon Kjaer should have done better with a header at the other end.
However, Milan was given a helping hand by Scamacca, who inadvertently diverted Hakan Calhanoglu's corner into his own net in the 68th minute.
It required late defensive heroics from Kjaer and Fiyako Tomori to stay in front as they each produced goal-line clearances to deny Andrea Masiello and Valon Behrami and keep Milan hanging on Inter's coattails.