Writing a same-sex relationship in her debut novel forced Catherine Gray out of a box she didn’t realise she had packed herself into; one of compulsory heterosexuality. The timing, she writes, is not optimal