Goals in each half from Steven Anderson and Steven MacLean secured a 2-0 victory for Saints and ensured the trophy was bound for McDiarmid Park for the first time in the club's 130-year history.
But McNamara, who won the cup three times as a player for Celtic, believes luck deserted his team at Celtic Park.
United Midfielder Ryan Dow came close to opening the scoring when his flick bounced off the inside of the post and striker Nadir Ciftci saw a free-kick hit the underside of the bar and bounce behind Alan Mannus before the Saints keeper smothered the ball.
"It just wasn't our day today," said McNamara. "The goal going in just before half-time was a real body blow for us but we tried to break them down in the second half and it just wouldn't go for us.
"We had chances but there's a thin line between winning and losing sometimes and I'm disappointed with the goals, especially the first one.
"I think we can play a lot better. I think we can raise the tempo, which we tried to do more in the second half.
"At times it was quite stop-start but we have to congratulate St Johnstone on their victory, you have to give them credit."
McNamara refused to blame keeper Radoslaw Cierzniak, who misjudged the corner which led to Anderson's opening goal in first-half stoppage time.
"He has been outstanding for me all season, I would never criticise a goalkeeper for coming for the ball and making a mistake," he said.
And his sentiments were echoed by Dow, who said: "You can't blame Rado. He has been brilliant all season and it was just one of those things.
"The boy has headed it in at the back post but we still had 45 minutes to get a goal and couldn't do it.
"With my shot, I thought it was in but it came off the post. Even as it has bounced out I thought it might have hit Anderson on the line and went in but it was not to be."