Scott Johnston, 19, from East Kilbride, followed the woman as she walked past Hampden Stadium where he has been at a Christmas party on December 8, last year.
The greenkeeper then forced his way into the woman's Mount Florida home and repeatedly hit her with an iron and raped her.
Johnston, who admitted the crime, claimed he was so drunk he had no memory of the event.
Police later released a detailed description of the attacker and after reading it Johnston's employer contacted them.
Forensic experts found DNA matching Johnston's on the victim's clothes and on a comb he had dropped.
Judge Lady Rae told Johnston: "All rapes are horrid crimes but what aggravates this is that the complainer was unknown to you, a complete stranger. You entered her home uninvited and forced yourself on her.
"This was a degrading sexual assault and you violently assaulted her with a weapon causing her severe injury."
Lady Rae added: "What is concerning is the level of brutality you are capable of when intoxicated.
"What you did to this lady has had a devastating effect on her. She can no longer live in her home."
Defence counsel Gordon Jackson QC said: "My client's position has always been that he was in a state of intoxication and has no recollection of this incident.
"This was a normal decent young man form a decent family until this happened. He is a first offender and it is difficult to understand he did what he did. There is no explanation in his history. But, he put his hands up and has accepted responsibility for what happened."
Earlier, Advocate depute Kath Harper, prosecuting, told the court that the victim had been out for the evening drinking, singing karaoke and dancing with a friend in the Beechwood Bar and left there about midnight and decided to walk home.
Ms Harper said: "She dies not remember leaving the pub or how she got home."
The court also heard a friend of the woman, who spotted Johnston talking to her as she walked along the street was so worried that he dialled 999.
However, when he saw the woman enter her close and Johnston take a different route he phoned back to say that she was in her house safe and well.
Minutes later the friend walked past her flat again and saw someone entering the close. It was only later he realised it was probably Johnston.
Ms Harper added: "After being in the Beechwood Bar the next thing the woman remembers is being in her living room lying face down on the floor.
"Her head was being held down by someone behind. her and she could not move.
"She struggled and when she tried to turn her head she was punched on the side of the face."
The 51-year-old reached out for an iron which was on the floor next to her and swung it and believes she hit Johnston with it.
She saw him stumble backwards and a comb fell out of his pocket.
Ms Harper said: "She describes the accused as enraged at this point. He took hold of the iron and struck her with it. Blood started to run from her head.
"The next thing she remembers is lying on the floor. Fearing for her life she played dead. She was then raped.
"She can't be sure if she remained conscious throughout the attack and has no sense of how long it lasted.
"She remembers hearing the close door shut and realised her attacker had gone."
The court heard that the woman suffered bruising to her face. The right side of her face was swollen and her right eye closed over. Her hair was matted with blood and the iron had blood on it."