Robert Bennett, 36, of Primrose Lane, was caught on CCTV illegally entering the West Point building in Wellington Street two times in December 2021.
Leeds Crown Court heard that he first broke into West Point at 1.25am on December 23.
He forced entrance into the concierge area and attempted to steal but left empty handed.
A few days later, on December 28, a resident in the same block of flats saw that her handle was being pushed down, the court was told.
Her door was not locked but the latch was on.
James Yearsley, prosecuting, told the court that the victim went to see what was happening when the defendant forced the door open.
The court heard that he was shocked at seeing the victim and said "sorry, sorry" before walking off.
Police spoke with the victim who was described as "visibly shaken".
CCTV footage showed that Bennett entered by the rear of the building and used the elevator.
He was seen again leaving in the same way in a hurried fashion.
Another officer identified Bennett on January 4, 2021, having recognised him from previous incidents.
A search of his house found a red and white jacket which had been seen on the CCTV footage.
Shila Whitehead, defending, said that her client did not deny the charges and pleaded guilty at the Magistrates' Court.
She said: "He accepts that he has a number of issues that do not help.
"He left school with no qualifications.
"He works as a labourer. He was not working and has limited funds."
Bennett has 58 previous convictions, including convictions for non-domestic burglary.
Judge Mushtaq Khokhar said: "You are a habitual burglar of non-domestic dwellings.
"Time and time again you have committed these offences."
Judge Khokhar sentenced him to 24 months in prison for the burglary that occurred on December 28.
He was sentenced to 20 weeks imprisonment for the burglary that occurred on December 23.
The sentences are to be served consecutively.
Support the YEP and become a subscriber today. Enjoy unlimited access to local news and the latest on Leeds United. With a digital subscription, you see fewer ads, enjoy faster load times, and get access to exclusive newsletters and content. Click here to subscribe.