The tax treaty between the 2 countries states the following:
Article 13 Capital Gains
(1) Gains from the alienation of immovable property, as defined in paragraph (2) of Article 6, may be taxed in the Contracting State in which such property is situated.
(2) Gains from the alienation of movable property forming part of the business property of a permanent establishment which an enterprise of a Contracting State has in the other Contracting State or of movable property pertaining to a fixed base available to a resident of a Contracting State in the other Contracting State for the purpose of performing professional services, including such gains from the alienation of such a permanent establishment (alone or together with the whole enterprise) or of such a fixed base, may be taxed in the other State.
(3) Notwithstanding paragraph (2) of this Article, gains from the alienation of ships and aircraft operated in international traffic and movable property pertaining to the operation of such ships and aircraft shall be taxable only in the Contracting State of which the alienator is a resident.
(4) Gains from the alienation of any property other than those mentioned in paragraphs (1) and (2), shall be taxable only in the Contracting State of which the alienator is a resident.
Yes the UK CGT would apply but on the gain after your allowances.
You are allowed a relief from Double Taxation in the UK based on the amount you pay in Portugal.