The 'he' in verse 27 refers to the 'prince that shall come'. We can show this three ways. Bear with me. This is long.
The first and most obvious way is that 'the prince that shall come' is the last person mentioned in verse 26 before the pronoun 'he' is used in verse 27 and so 'the prince that shall come' is most naturally who 'he' refers to. That is not definite though.
The second and third way come from the context. Context is critical. You reference verse 25 and verse 26 in order to explain verse 27, but we really need to go back to the beginning of the chapter.
What started Daniel's conversation with Gabriel?
Daniel 9:1
In the first year of Darius, son of Ahasuerus, of the seed of the Medes, who hath been made king over the kingdom of the Chaldeans,
in the first year of his reign, I, Daniel, have understood by books the number of the years, in that a word of Jehovah hath been unto Jeremiah the prophet, concerning the fulfilling of the wastes of Jerusalem – seventy years;
...
Daniel was reading Jeremiah 25:9-13 where it says the same thing it says here - God sentenced the land of Judah to destruction for 70 years.
Afterward Daniel was moved to pray, and what does he pray about for 16 verses?
Daniel 9:3-19
...
and I set my face unto the Lord God, to seek by prayer and supplications, with fasting, and sackcloth, and ashes.
And I pray to Jehovah my God, and confess, and say: ‘I beseech Thee, O Lord God, the great and the fearful, keeping the covenant and the kindness to those loving Him, and to those keeping His commands;
we have sinned, and done perversely, and done wickedly, and rebelled, to turn aside from Thy commands, and from Thy judgments:
and we have not hearkened unto Thy servants the prophets, who have spoken in Thy name unto our kings, our heads, and our fathers, and to all the people of the land.
‘To Thee, O Lord, is the righteousness, and to us the shame of face, as at this day, to the men of Judah, and to the inhabitants of Jerusalem, and to all Israel, who are near, and who are far off, in all the lands whither Thou hast driven them, in their trespass that they have trespassed against Thee.
‘O Lord, to us is shame of face, to our kings, to our heads, and to our fathers, in that we have sinned against Thee.
‘To the Lord our God are the mercies and the forgivenesses, for we have rebelled against Him,
and have not hearkened to the voice of Jehovah our God, to walk in His laws, that He hath set before us by the hand of His servants the prophets;
and all Israel have transgressed Thy law, to turn aside so as not to hearken to Thy voice; and poured on us in the execration, and the oath, that is written in the law of Moses, servant of God, because we have sinned against Him.
‘And He confirmeth His words that He hath spoken against us, and against our judges who have judged us, to bring in upon us great evil, in that it hath not been done under the whole heaven as it hath been done in Jerusalem,
as it is written in the law of Moses, all this evil hath come upon us, and we have not appeased the face of Jehovah our God to turn back from our iniquities, and to act wisely in Thy truth.
And Jehovah doth watch for the evil, and bringeth it upon us, for righteous is Jehovah our God concerning all His works that He hath done, and we have not hearkened to His voice.
And now, O Lord our God, who hast brought forth Thy people from the land of Egypt by a strong hand, and dost make for Thee a name as at this day, we have sinned, we have done wickedly.
...
Pay extra attention to this part:
...
‘O Lord, according to all Thy righteous acts, let turn back, I pray Thee, Thine anger and Thy fury from Thy city Jerusalem, Thy holy mount, for by our sins, and by the iniquities of our fathers, Jerusalem and Thy people are for a reproach to all our neighbours;
and now, hearken, O our God, unto the prayer of Thy servant, and unto his supplication, and cause Thy face to shine on Thy sanctuary that is desolate, for the Lord’s sake.
‘Incline, O my God, Thine ear, and hear, open Thine eyes and see our desolations, and the city on which Thy name is called; for not for our righteous acts are we causing our supplications to fall before Thee, but for Thy mercies that are many.
O lord, hear, O Lord, forgive; O Lord, attend and do; do not delay, for Thine own sake, O my God, for Thy name is called on Thy city, and on Thy people.’
Daniel started this chapter reading Jeremiah’s prophecy about the destruction of Jerusalem and how long before the destruction would end. Daniel then prayed to God about the destruction of Jerusalem and begged him to bring the destruction to an end. And then what happened?
Daniel 9:20-24
...
And while I am speaking, and praying, and confessing my sin, and the sin of my people Israel, and causing my supplication to fall before Jehovah my God, for the holy mount of my God,
yea, while I am speaking in prayer, then that one Gabriel, whom I had seen in vision at the commencement, being caused to fly swiftly, is coming unto me at the time of the evening present.
And he giveth understanding, and speaketh with me, and saith, ‘O Daniel, now I have come forth to cause thee to consider understanding wisely;
at the commencement of thy supplications [again, what was Daniel praying about?] hath the word come forth, and I have come to declare it, for thou art greatly desired, and understand thou concerning the matter, and consider concerning the appearance.
‘Seventy weeks [sevens] are determined for thy people, and for thy holy city, to shut up the transgression, and to seal up sins, and to cover inquity, and to bring in everlasting judgment [ancient justice], and to seal up vision and prophet and to anoint the holy of holies.
...
Here is an excerpt from Gesenius Lexicon that shows the "everlasting judgment" should be "ancient justice". Notice how he says it has to have this meaning and then he says it can't have this meaning and why.

Daniel 9:25 (the edits are mine):
...
And thou dost know, and dost consider wisely, from the going forth of the word to restore and to build Jerusalem till Messiah the Leader [anointed prince] is seven weeks [sevens], and sixty and two weeks [sevens]: the broad place hath been built again, and the rampart, even in the distress of the times.
...
There is such a strong tradition saying that this must refer to Jesus Christ that even Robert Young did not translate this literally in his literal translation. For instance, the word "Messiah" only shows up in these two verses (Daniel 9:25-26) and Psalms 2. (In King James, the word Messiah is only used in Daniel 9-25-26.) Everywhere else that Hebrew word (משיח) appears, Young translated that word into "anointed". He should have done that here too.
Also there is no definite article - no "the" (in Hebrew, no ה) - in that phrase. It should just be "anointed leader", not "the anointed leader".
In addition, Gabriel said the 7 sevens was "from the going forth of the word to restore and rebuild Jerusalem" to the anointed leader. Which word was Gabriel referring to? The same word that started this whole thing.
Read Daniel 9:2 again:
...
in the first year of his reign, I, Daniel, have understood by books the number of the years, in that a word of Jehovah hath been unto Jeremiah the prophet, concerning the fulfilling of the wastes of Jerusalem -- seventy years;
...
The same Hebrew word (דבר) is translated into "word" in verse 2 and 25.
There would be 70 years between when Jerusalem was destroyed and then rebuilt, but 7 sevens into it - or 49 years into it - an anointed leader would come on the scene. Who was that?
Isaiah 44:26-28, 45:1
...
Confirming the word of His servant, The counsel of His messengers it perfecteth, Who is saying of Jerusalem, She is inhabited, And of cities of Judah, They shall be built, and her wastes I raise up,
Who is saying to the deep, Be dry, and thy rivers I cause to dry up,
Who is saying of Cyrus, My shepherd, And all my delight He doth perfect, So as to say of Jerusalem, Thou art built, And of the temple, Thou art founded.
Thus said Jehovah, To His anointed, to Cyrus, Whose right hand I have laid hold on, To subdue nations before him, Yea, loins of kings I loose, To open before him two-leaved doors, Yea, gates are not shut:
...
Jerusalem was destroyed by the Babylonians around 585 BC. Cyrus took power around 536 BC. That is a 49 year difference. And it was in the first year of his reign that he decreed the Jews could return to their land.
2Chronicles 36:22
...
And in the first year of Cyrus king of Persia, at the completion of the word of Jehovah in the mouth of Jeremiah, hath Jehovah waked up the spirit of Cyrus king of Persia, and he causeth an intimation to pass over into all his kingdom, and also in writing, saying,
'Thus said Cyrus king of Persia, All kingdoms of the earth hath Jehovah, God of the heavens, given to me, and He hath laid a charge on me to build to Him a house in Jerusalem, that is in Judah; who is among you of all His people? Jehovah his God is with him, and he doth go up.'
Also Ezra 1:1-4:
And in the first year of Cyrus king of Persia, at the completion of the word of Jehovah from the mouth of Jeremiah, hath Jehovah waked up the spirit of Cyrus king of Persia, and he causeth an intimation to pass over into all his kingdom, and also in writing, saying,
'Thus said Cyrus king of Persia, All kingdoms of the earth hath Jehovah, God of the heavens, given to me, and He hath laid a charge on me to build to Him a house in Jerusalem, that is in Judah;
who is among you of all His people? His God is with him, and he doth go up to Jerusalem, that is in Judah, and build the house of Jehovah, God of Israel -- He is God -- that is in Jerusalem.
'And every one who is left, of any of the places where he is a sojourner, assist him do the men of his place with silver, and with gold, and with goods, and with beasts, along with a free-will offering for the house of God, that is in Jerusalem.'
...
After this period of 7 sevens (49 years), there would be another period of 62 sevens (434 years) in which the broad place (plaza) and the walls/moat would be rebuilt. Josephus says Pompey had a hard time filling in the moat to conquer Jerusalem and take the temple because of its immense size. Strabo says the moat was 60 feet deep and 250 feet wide. The city walls and the moat around the walls were huge. It would have taken some time to finish them, especially with all the political turmoil that nation had to deal with in that interval.
Daniel 9:26
...
And after sixty and two weeks [sevens], cut off is Messiah [anointed], and the city and the holy place are not his [literally, "and he has not"], the Leader who hath come doth destroy the people; and its end is with a flood, and till the end is war, determined are desolations.
...
There was an anointed person (verse 25) before the 62 sevens (434 years). After the 62 sevens (434 years) there is another anointed person (verse 26) who is cut off.
The 10-word phrase Robert Young translated as 'and the city and the holy place are not his' comes from 2 Hebrews words:
- ועין literally 'and there is not'
- לו literally 'to him'
"And there is not to him", i.e "and he has not".
Putting that all together: After the 62 sevens (434 years), another anointed person comes on the scene. He is cut off (he dies), and he has not (he has no descendants), and the leader who comes (comes in his place) destroys the people.
This is the second way to show 'he' in verse 27 refers to 'the prince who shall come'. The anointed/Messiah mentioned in verse 26 is dead by verse 27.
Antiquities of the Jews 13.11.1:
Now when their father Hyrcanus was dead, the eldest son Aristobulus, intending to change the government into a kingdom, for so he resolved to do, first of all put a diadem on his head [he was the high priest - anointed],
four hundred eighty and one years and three months after the people had been delivered from the Babylonish slavery, and were returned to their own country again.
This Aristobulus loved his next brother Antigonus, and treated him as his equal; but the others he held in bonds.
He also cast his mother into prison, because she disputed the government with him; for Hyrcanus had left her to be mistress of all.
He also proceeded to that degree of barbarity, as to kill her in prison with hunger; nay, he was alienated from his brother Antigonus by calumnies, and added him to the rest whom he slew; yet he seemed to have an affection for him, and made him above the rest a partner with in the kingdom.
Those calumnies he at first did not give credit to, partly because he loved him, and so did not give heed to what was said against him, and partly because he thought the reproaches were derived from the envy of the relaters.
But when Antigonus was once returned from the army, and that feast was then at hand when they make tabernacles to [the honor of God,] it happened that Aristobulus was fallen sick, and that Antigonus went up most splendidly adorned, and with his soldiers about him in their armor, to the temple to celebrate the feast, and to put up many prayers for the recovery of his brother, when some wicked persons, who had a great mind to raise a difference between the brethren, made use of this opportunity of the pompous appearance of Antigonus, and of the great actions which he had done, and went to the king, and spitefully aggravated the pompous show of his at the feast, and pretended that all these circumstances were not like those of a private person; that these actions were indications of an affectation of royal authority; and that his coming with a strong body of men must be with an intention to kill him; and that his way of reasoning was this: That it was a silly thing in him, while it was in his power to reign himself, to look upon it as a great favor that he was honored with a lower dignity by his brother.
Aristobulus yieled to these imputations, but took care both that his brother should not suspect him, and that he himself might not run the hazard of his own safety; so he ordered his guards to lie in a certain place that was under ground, and dark; (he himself then lying sick in the tower which was called Antonia;) and he commanded them, that in case Antigonus came in to him unarmed, they should not touch any body, but if armed, they should kill him; yet did he send to Antigonus, and desired that he would come unarmed; but the queen, and those that joined with her in the plot against Antigonus, persuaded the messenger to tell him the direct contrary: how his brother had heard that he had made himself a fine suit of armor, that he might see how fine it was.
So Antigonus suspecting no treachery, but depending on the good-will of his brother, came to Aristobulus armed, as he used to be, with his entire armor, in order to show it to him; but when he was come to the place which was called Strato’s Tower, where the passage happened to be exceeding dark, the guards slew him; which death of his demonstrates that nothing is stronger than envy and calumny, and that nothing dose more certainly divide the good-will and natural affections of men than those passions.
...
But Aristobulus repented immediately of this slaughter of his brother; on which account his diseases increased upon him, and he was disturbed in his mind, upon the guilt of such wickedness, insomuch that his entrails were corrupted by his intolerable pain, and he vomited blood: at which time one of the servants that attended upon him, and was carrying his blood away, did, by Divine Providence, as I cannot but suppose, slip down, and shed part of his blood at the very place where there were spots of Antigonus’s blood, there slain, still remaining; and when there was a cry made by the spectators, as if the servant had on purpose shed the blood on that place, Aristobulus heard it, and inquired what the matter was; and as they did not answer him, he was the more earnest to know what it was, it being natural to men to suspect that what is concealed is very bad: so upon his threatening, and forcing them by terrors to speak, they at length told him the truth; whereupon he shed many tears, in that disorder of mind which arose from his consciousness of what he had done, and gave a deep groan, and said, “I am not therefore, I perceive, to be concealed from God, in the impious and horrid crimes I have been guilty of; but a sudden punishment is coming upon me for the shedding the blood of my relations. And now, O thou most impudent body of mine, how long wilt thou retain a soul that ought to die, in order to appease the ghosts of my brother and my mother?
Why dost thou not give it all up at once? And why do I deliver up my blood drop by drop to those whom I have so wickedly murdered?”
In saying which last words he died, having reigned a year.
He was called a lover of the Grecians; and he conferred many benefits on his own country, and made war against Iturea, and added a great part of it to Judea, and compelled the inhabitants, if they would continue in that country, to be circumcised, and to live according to the Jewish laws.
He was naturally a man of candor, and of great modesty, as Strabo bears witness, in the name of Timagenes; who says thus: “This man was a person of candor, and very serviceable to the Jews; for he added a country to them, and obtained a part of the nation of the Itureans for them, and bound them to them by the bond of circumcision of their genitals.”
Antiquities of the Jews 13.13.1:
When Aristobulus was dead, his wife Salome, who, by the Greeks, was called Alexandra, let his brethren out of prison, (for Aristobulus had kept them in bonds, as we have said already,) and made Alexander Janneus king, who was the superior in age and in moderation.
This child happened to be hated by his father as soon as he was born, and could never be permitted to come into his father’s sight till he died.
The occasion of which hatred is thus reported: when Hyrcanus chiefly loved the two eldest of his sons, Antigonus and Aristobulus, God appeared to him in his sleep, of whom he inquired which of his sons should be his successor.
Upon God’s representing to him the countenance of Alexander, he was grieved that he was to be heir of all his goods, and suffered him to brought up in Galilee.
However, God did not deceive Hyrcanus; for after the death of Aristobulus, he certainly took the kingdom; and one of his brethren, who affected the kingdom, he slew; and the other, who chose to live a private and quiet life, he had in esteem.
...
Continuing Daniel 9 again:
...
And he hath strengthened a covenant with many -- one week, and in the midst of the week he causeth sacrifice and present to cease, and by the wing of abominations he is making desolate, even till the consummation, and that which is determined is poured on the desolate one.'
The Hebrew word translated into 'week' twice in verse 27 is a different Hebrew word that means a literal Sunday-to-Saturday 7-day week. The instance at the beginning of verse 27 it is שביע - 'week' - and in the second instance, it is the same Hebrew word with a ה prepended - השביע - 'the week'.
Deuteronomy 31:9-13 describes the covenant this anointed leader was confirming:
...
And Moses writeth this law, and giveth it unto the priests (sons of Levi, those bearing the ark of the covenant of Jehovah), and unto all the elders of Israel,
and Moses commandeth them, saying, ‘At the end of seven years, in the appointed time, the year of release, in the feast of booths,[a week long celebration]
in the coming in of all Israel to see the face of Jehovah in the place which He chooseth, thou dost proclaim this law before all Israel, in their ears.
‘Assemble the people, the men, and the women, and the infants, and thy sojourner who is within thy gates, so that they hear, and so that they learn, and have feared Jehovah your God, and observed to do all the words of this law;
and their sons, who have not known, do hear, and have learned to fear Jehovah your God all the days which ye are living on the ground whither ye are passing over the Jordan to possess it.’
...
Antiquities of the Jews 13.13.1 records this man destroying the people, confirming the covenant, and causing the sacrifice to cease in the middle of the week [an actual week]:
As to Alexander, his own people were seditious against him; for at a festival which was then celebrated [Feast of Tabernacles], when he stood upon the altar, and was going to sacrifice, the nation rose upon him, and pelted him with citrons which they then had in their hands, because the law of the Jews required that at the feast of tabernacles every one should have branches of the palm tree and citron tree; which thing we have elsewhere related.
They also reviled him, as derived from a captive, and so unworthy of his dignity and sacrificing.
At this he was in a rage, and slew of them about six thousand.
He also built a partition-wall of wood round the altar and the temple, as far as that partition within which it was only lawful for the priests to enter; and by this means he obstructed the multitude from coming at him.
He also maintained foreigners of Pisidiae and Cilicia; for as to the Syrians, he was at war with them, and so made no use of them.
He also overcame the Arabians; such as the Moabites, and Gileadites, and made them bring tribute.
Moreover he demolished Amathus: while Theodorus durst not fight with him. But as he had joined battle with Obedas, King of the Arabians, and fell into an ambush, in places that were rugged and difficult to be travelled over, he was thrown down into a deep valley, by the multitude of the camels, at Gadara, a village of Gilead, and hardly escaped with his life.
From thence he fled to Jerusalem. Where, besides his other ill success, the nation insulted him, and he fought against them for six years, and slew no fewer than fifty thousand of them.
And when he desired that they would desist from their ill will to him, they hated him so much the more, on account of what had already happened.
And when he had asked them what he ought to do? They all cried out, that he ought to kill himself. They also sent to Demetrius Eucerus, and desired him to make a league of mutual defence with them.
Antiquities of the Jews 13.14.1:
So Demetrius came with an army, and took those that invited him, and pitched his camp near the city Shechem; upon which Alexander, with his six thousand two hundred mercenaries, and about twenty thousand jews, who were of his party, went against Demetrius, who had three thousand horsemen, and forty thousand footmen.
Now there were great endeavors used on both sides, - Demetrius trying to bring off the mercenaries that were with Alexander, because they were Greeks, and Alexander trying to bring off the Jews that were with Demetrius.
However, when neither of them could persuade them so to do, they came to battle, and Demetrius was the conqueror; in which all Alexander’s mercernaries were killed, when they had given demonstration of their fidelity and courage. A great number of Demetrius’s soldiers where slain also.
Finally, recall Gabriel tells Daniel that 'he' (the same he you asked about) in verse 27 is making desolate, even till the consummation. Consummation of what? Consummation of the 70 sevens!
Antiquities of the Jews 13.14.2:
Now as Alexander fled to the mountains, six thousand of the Jews hereupon came together [from Demetrius] to him out of pity at the change of his fortune; upon which Demetrius was afraid, and retired out of the country; after which the Jews fought against Alexander, and being beaten, were slain in great numbers in the several battles which they had;
and when he had shut up the most powerful of the in the city Bethome, he besieged them therein; and whe he had taken the city, and gotten the men into his power, he brought them to Jerusalem, and did one of the most barbarous actions in the world to them; for as he was feasting with his concubines, in the sight of all the city, he ordered about eight hundred of them to be crucified; and while they were living, he ordered the throats of their children and wives to be cut before their eyes.
This was indeed by way of revenge for the injuries they had done him; which punishment yet was of an inhuman nature, though we suppose that he had been never so much distressed, as indeed he had been, by his wars with them, for he had by their means come to the last degree of hazard, both of his life and of his kingdom, while they were not satisfied by themselves only to fight against him, but introduced foreigners also for the same purpose; nay, at length they reduced him to that degree of necessity, that he was forced to deliver back to the king of Arabia the land of Moab and Gilead, which he had subdued, and the places that were in them, that they might not join with them in the war against him, as they had done ten thousand other things that tended to affront and reproach him.
However, this barbarity seems to have been without necessity, on which account he bare the name of a Thracian among the Jews whereupon the solders that had fought against him, being about eight thousand in number, ran away by night, and continued fugitives all the time that Alexander lived; who being now freed from any further disturbance from them, reigned the rest of his time in utmost tranquility.
And so the third way to show that 'he' refers to the 'prince who shall comes' is that in all of this, and it was the prince that came after the one who died who caused the massive destruction.