This is the same footing as a common law spouse (there is actually no such thing in the UK) - your gender is irrelevant.
There is no automatic right to a share in the property.
A court will need to establish that there was an INTENTION that the non-owning person would be entitled to a share and that the intention was acted upon. By not putting the name on either the mortgage or the title deeds, nor having anything at all in writing, it will be difficult.
The non-owning partner could help to prove intention by showing s/he has paid for improvements, or financially supported the other so has made a contribution to the running costs.
It is very difficult to prove and could cost many thousands of pounds in the courts.