The hosts dominated possession for much of the encounter, before Juan Cala snatched a precious three points for the Welsh club with a left-footed drive in the 65th minute and David Marshall safeguarded the advantage with two impressive late saves.
Manager Solskjaer feels his charges did enough to merit the win - which leaves them just three points adrift of safety - and declared his relief at registering his first away victory in the Cardiff hot seat.
"It's great," he told Sky Sports. "I've not won a game away from home. It's my first time travelling home with the fans celebrating a win. It's fantastic.
"We did earn it. We did deserve it. They had their chances but we've got one of the best keepers in the league. It was a great effort."
Solskjaer also reserved special praise for his goalscorer, and backed his charges to pull off a "miracle" survival.
"It was a great goal. He's a good footballer," the Norwegian added. "We played with great confidence. I think we showed everyone we believe in this miracle we've spoken about."
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.