North End conceded in the first half through their own means, Jordan Storey turning the ball into his own net from a sliced clearance.
Before the break however Alan Browne was sent off for kicking out at Sam Morsy, despite the Egyptian twice swinging an elbow in the direction of the North End skipper.
At the interval, manager Alex Neil also saw red after speaking to referee Oliver Langford on the pitch.
Marcus Tavernier doubled Middlesbrough's lead in the second half and it was too much for 10-man Preston to overcome.
The opening goal came against the run of play and Gallagher was pleased with how his side started, and wasn't surprised by the antics that proved to change the game.
He said: "At the beginning of the game I thought we started well, we were on the front foot, were determined and played some good stuff. We just didn't get the goal.
"We hit the bar with Sepp van den Berg, it was a great strike. We made some overloads down the side and we knew it was going to be man for man and we'd get some opportunities, but we didn't take the chances.
"Unfortunately we shoot ourselves in the foot with the own goal and we're on the back foot then.
"A decision comes and if we're being honest it should have been ours and it should have been them having a man sent off.
"I don't like talking about referees but he said he didn't see it, he said it was the fourth official.
"He's got to see the first action where Morsy throws out twice at Alan Browne, I remember him doing it at Deepdale and he's got a history of this, I said that to him.
"Even his own players say he does it in training. It's one of them.
"I don't like making excuses but when it's blatant like that and it's going to swing the game, it's not nice to see."
PNE boss Alex Neil was sent to the stands for the first time in his managerial career, though with current regulations and no fans in attendance, he was virtually stood alongside the substitutes in the stands.
Speaking post match, the Scot insisted he remained calm and simply asked referee Langford a question, something which Gallagher agrees with, feeling the referee lost his cool.
He said: "I was with the manager, with Ched, and the manager talked to the referee in a way that he shouldn't have been sent off. He just asked him a question.
"He wasn't angry or anything like that, he just asked the question of 'why did you send him off and how haven't you seen the first one?'
"The referee just lost it really and sent the manager off. Me and Ched would back the manager that he didn't raise his voice, he could have lost it with the decision he made, but he didn't raise his voice in any way shape or form.
"It was just one of those days at the office really. It's disappointing but what I will say is if we play like we did in that first 20 minutes, that togetherness, that will to work hard for each other, then that's going to be a recipe for success for us."
Thanks for reading. If you value what we do and are able to support us, a digital subscription is just £1 per month for the first two months. Try us today by clicking here.