I am seeing this so often at the moment so here goes…
Is the agent asking you to pay them to sort this problem? If yes, do not under any circumstances pay them.
If it is the Catastro that is incorrect, you may well have to pay to get the land re-measured and then processed with the catastro and this sort of cost is about right.
Your lawyer should organise this for you (albeit they should have picked up on it when they bought it for you).
The difficulty with the Catastro is that they are very slow and things can take some time to get updated however your lawyer should be able to produce a reciept to confirm that they have submitted this to the Catastro and this should satisfy your agent and any possible buyer.
If the problem is with the Property Register then you are in for a bigger bill because the escritura will need to be re-written and passed by the notary and then updated at the Property Register (and then attract a 1% charge).
Please don’t pay the agent anything. A lawyer is needed and ideally one who understands what you are trying to achieve.