expression
I'm very sorry; it's inexcusable
Very formal apology, stronger than すみません. Used in business or serious situations to express deep regret.
ご迷惑をおかけして、申し訳ございません。
I am very sorry for causing you trouble.
expression
thank you very much (for help, etc.)
Used to express deep gratitude when someone has gone out of their way to help, often implying that the speaker feels unworthy of the kindness.
わざわざお越しいただき、申し訳ございません。
Thank you very much for coming all this way (I'm sorry to have troubled you).
Less formal apology/thanks; 申し訳ございません is much more polite and serious.
Slightly less formal than 申し訳ございません, but still very polite; ございません is the most humble form.
Combination of 申し訳 (excuse, apology) and the humble polite negative of ござる (to be), literally 'there is no excuse'.