In principle yes. The solicitor should have checked the title and ensured that you had full title from the public highway (assuming the house and garage lead off a highway). If the access is over other privately owned land, then the check should have been more careful, to ensure you had a full right of way over the land.
Ownership of access arrangements (particularly for older properties) can sometimes be complex and difficult to disentangle, but if this was the case you should have been warned in writing before you went ahead with the purchase.
If you now have to pay to retain the access, it may be that you could have a claim against the solicitor.