The border crossing is open until midnight, however I am asking about the visa office, i.e. the visa office at the top of the stairs opposite the immigration desks where you can get a 5 day visa.
This website seems to state that the Visa office closes at 7pm:
China Travel Service (H.K.) Limited
However, I've been informed by a colleague that it actually closes at 9pm. So I am asking here if anyone else knows?