There aren't many places in internet that let you book a bus from Portugal to Spain.
After a bit of searching I found eurolines.
You can book a ticket all the way from Coimbra to Granada.
Here is a link.
https://eurolines.esIt is also possible to book buses from anywhere in Europe to Granada.