고지식하다 is a great example of how sound changes can disguise a word's origin and make it harder to remember in spite of being composed of parts which you actually know already.
Just as I illustrated in the previous post how 마찬가지 is in fact "마치 + 한 + 가지" put together, 고지식하다 is likewise simply a combination of "곧 [直(직)] + 이 (affix) + 식 [識(식)] (+ 하다)." "곧" can be a tricky word to describe and translate, but it has a general temporal meaning of "at once, right away, straight away," which also encompasses the sense of "upright, straight, just." When you combine "곧" with the affix 이, ㄷ + 이ends up being pronounced as ㅈ+이 -> 지, hence the "고지" part of 고지식 (cf. the pronunciation of "등받이" as 등바지, meaning the "backrest of a chair"). Once again, a spelling change has concealed the origin of a word and made it seem like a different word altogether.
The final "식" in 고지식 means "to know, knowledge." So, if we put together all that we've seen so far, we have "right/ just (as) + (one) knows (곧 + 이 + 식)." In a smoother and less literal translation, the word can be described as "doing just as one knows." This is where the sense of being inflexible, stiff and rigid comes from, since person who is unwilling to learn anything new and only does as they already know or have been taught is considered inflexible and rigid.
백문식. 우리말 어원 사전. 1st ed. 서울: 도서출판 박이정, 2014. Print.