To my great delight, I passed the exam.

Literal

Extremely happy [to the fact that-ことには], I [topic-は] exam [in-に] passed.

非常にうれしいことには is a set pattern meaning 'to my great joy/delight.' ことには frames the emotional reaction as the larger context for the news. 合格した means 'passed (an exam).'