I thought Pres. Buchanan was the first!
He was. Ironically, his lover was the first gay VP and longtime Alabama Senator, William Rufus De Vane King (partly how Pennsylvanian Buchanan was attacked for being a Southern sympathizer).
To hear the Log Cabin Republicans In Name Only tell it, Abe Lincoln was queer.