They seem to have come from some very primitive mammal near the base of Laurasiatheria that also gave rise to one or more of the other groups in the superorder.
For a long time, bats were thought to be part of the superorder Archonta -- the group that includes treeshrews, colugos, and primates, because those are the mammals they look the most like.