Genial derives from the Latin adjective genialis, meaning "connected with marriage." When genial was first adopted into English in the mid-16th century, it meant "of or relating to marriage," a sense that is now obsolete. Genialis was formed in Latin by combining the -alis suffix (meaning "of, relating to, or characterized by") with genius, meaning "a person's disposition or inclination." As you may have guessed, Latin genius is the ancestor of the English word genius, meaning "extraordinary intellectual power"—so it's logical enough that genial eventually developed a sense (possibly influenced by the German word genial) of "marked by very high intelligence."