First-half goals from Stuart Armstrong and Gary Mackay-Steven saw the Tangerines take a 2-0 lead before Stevie Smith pulled a goal back for the Gers in the 42nd minute, but a late goal by Nadir Ciftci ensured that the away side would make the final two.
McNamara told reporters after the game: "We got what I expected. Set-pieces caused us problems and our concentration from second balls off big Jon [Daly] was good.
"I wasn't really concerned from open play. There are fine lines in games and I know we can play a lot better than we did today.
"There were a few opportunities when we could have picked a better final ball but I'm delighted to get through. It's a big ask for my young players to handle these occasions and that will serve them well in the future."
Dundee United will meet the winners of tomorrow's game between Aberdeen and St Johnstone in the Scottish Cup final.