This was ad-libbed by the voice actor, Craig Ferguson and they chose to keep it in because they loved it. Kids won’t get it but adults will be thinking “did he just imply what I think he implied?”
And later the director confirmed it.
DeBlois revealed that, the reason Gobber never got married, is because he is homosexual. This makes him the first homosexual character of the franchise, and even DreamWorks itself.
"Guys, lets hint at the fact theres something other than heterosexuality. It’ll be ground breaking.