Dundee appealed that Gary Mackay-Steven had run the ball out of play on the right wing but McWilliam did not agree and the winger cut inside Brian Easton and Ryan Conroy before being brought down by the latter.
Barry Douglas swung in the free-kick and McLean rose above everyone else to beat Dundee goalkeeper Rab Douglas to the ball and head into an empty net from inside the six-yard box with 11 minutes gone.
Dundee equalised through Jim McAlister and were on top before Mackay-Steven drilled home the winner in the 35th minute, with the visitors holding firm in the second half to book their semi-final place.
Brown said: "It was an even game, both teams went for it.
"I'm pretty bitter about a decision that never went our way, a clear throw-in, that ultimately results in a free-kick that shouldn't have happened. I don't really need to talk about how you defend it because that shouldn't come into play if they do their jobs right. An official has cost this football club a replay and a chance to get to a semi-final.
"That decision in the first half basically took it out of our hands."
United manager Jackie McNamara did not feel the incident was crucial but he admitted it had been an even encounter.
McNamara said: "I saw them appealing but I didn't actually see it was out. I think things went for both teams, some decisions."
He added: "It was quite an even match, we can play a lot better but Dundee made it hard for us. It was a typical cup tie and derby, not a lot of quality or passing. But credit to our lads, and Dundee as well, they put a lot of pressure on us and put extra men up front. I thought we coped with it really well."
- Sports & Recreation