Milan agreed a contract with the Argentina player only for the deal to collapse over the transfer fee.
Tevez returned to action after a six-month absence by coming on a substitute on Wednesday to set up Samir Nasri's winning goal in a 2-1 Premier League victory over Chelsea at the Etihad Stadium.
Tevez had been missing from City's side after infamously refusing to warm up during a Champions League match at Bayern Munich.
“A train like that doesn’t pass for a second time,” said Galliani.
“I saw him yesterday and, after six months in which he had not played, he performed as he usually does and changed a game which could be crucial for Manchester City.
“I was in love with Tevez, but destiny decided otherwise, and we are more than happy with Maxi Lopez.”
Milan proposed to finance the move for Tevez by flogging Alexandre Pato to Paris Saint-Germain.
The Brazil striker has been missing for much of the season due to a thigh injury.
“He’ll be looked at by an American specialist, but he is a great and will remain with us," added Galliani. "He’s an important player at this club.”