"stylish, classy, posh," 1913, from earlier noun or verb; "A midland and s.w. dial. word taken into general slang use at the beginning of the 20th cent." [OED]; compare swank (n.) "ostentatious behavior," noted in 1854 as a Northampton word; swank (v.), from 1809 as "to strut, behave ostentatiously." Perhaps ultimately from Proto-Germanic *swank-, from PIE *sweng(w)-, a Germanic root meaning "to swing, turn, toss" (source also of Middle High German swanken "to sway, totter, turn, swing," Old High German swingan "to swing;" see swing (v.)). Perhaps the notion is of "swinging" the body ostentatiously (compare swagger).
A separate word-thread derives from Old English swancor "pliant, bending," and from this comes swanky (n.) "active or clever young fellow" (c. 1500).