Gallagher has acknowledged that a spot kick should have been given, but criticised the left-back for his theatrics inside the area.
"I think it is a penalty but I can understand why the referee didn't give it when you see how Marcelo goes down," Gallagher told Sky Sports News.
"How he reacts sells it to the referee that it isn't a penalty. Sometimes I would say to a player not to try and convince the referee that it's a penalty because often, you don't get them. "
Had a penalty been given, it would have given Real the opportunity to end Barcelona's long-standing unbeaten run in La Liga this season.