Is it possible for project grants to cover family visa fees?
I think this would depend on the circumstances and there is going to be a difference between people currently inside and outside the UK. For example, the MRC, and probably other research councils, considers relocation costs as allowable. For someone currently outside the UK, visa fees for an entire family might be allowed as relocation costs, although they will probably be too large. For someone currently inside the UK, I think it would be difficult to claim visa fees are relocation costs.

When I came over to the UK as a lecturer, I was funded by an NIHR grant. I believe the grant, although it could have been a departmental account, paid for the visa fees for my family. The money paid for the visa fees was considered income, although not pensionable, and therefore taxed. The grant also covered the additional tax liability associated with the visa fees. When my visa expired and I needed to renew, the department basically laughed at me when I asked them to cover my visa renewal fees.

As payment of the visa fees are considered income, it is unclear how They could be costed into a grant. It is possible that overhead from a grant or a discretionary account could be used to pay the fees. My experience suggests that departments are not happy to allow a PI to use discretionary funds to pay themselves. I might be allowed to pay for visa fees for my staff, but I have never tried.

It is also probably worth noting that finding someone able to sponsor non-EU employees, especially at the post-doc level, is becoming increasingly difficult.