The Saints skipper was dismissed by referee Craig Thompson on 65 minutes for a second bookable offence and Dundee capitalised, Carl Finnigan hitting a late winner to seal a 2-1 victory.
Lennon said: "Jim is an important and experienced player for us but he put himself and the team in a difficult position and Craig ran out of patience with him."
Dundee took a fifth-minute lead at Paisley through Jim McAlister but Steven Thompson levelled seven minutes into the second period with a thumping header.
However, after losing Goodwin, Saints found it harder to repel their desperate visitors and were undone with nine minutes remaining.
Lennon was impressed by Dundee and has urged his team to replicate it at Hibernian next week and end their own relegation fears.
"Dundee brought a fighting spirit and desire and that's something I'm hoping my players can learn from in the last four games," he said.
"When we bring our industry, it brings out our strengths. But when we don't, we are very ordinary. In fact we were below ordinary.
"We can look over our shoulder now and see Dundee have picked up good momentum but we are still in a very comfortable position ourselves."