The visitors tire Johnny out because he is very weak, but he is happy to see them.
When Pony gets to the hospital, he finds out that Johnny is in bad shape and has been asking for him and Dally. At first, they find it difficult to get information about Johnny because they are not family members, until "Darry finally got it through the guy's head that we were about as much family as Dally and Johnny had" (Ch. 7). Then they learn:
He was in critical condition. His back had been broken when that piece of timber fell on him. He was in severe shock and suffering from third-degree burns. …He kept calling for Dallas and Ponyboy. (Ch. 7)
On that first night, the doctor tells them to go home. There is nothing more they can do. Johnny is badly injured, on pain-killers, and may not live. There is nothing they can do for him.
When Ponyboy goes back to visit Johnny, the nurses do not want to let him visit because Johnny is in critical condition, but “Two-Bit wouldn't take no for an answer” (Ch. 8). A doctor finds out what is going on and lets them in, saying it won’t make any difference now. Johnny is dying.
I could see that even a few words were tiring him out; he was as pale as the pillow and looked awful. Two-Bit pretended not to notice. (Ch. 8)
The boys joke around with Johnny, and he is polite to them. Johnny tells Pony he is afraid to die, and then doesn’t want to see his mother.
The next time they try to see Johnny, Dally threatens the doctor with a knife. He tells them that he is letting them see Johnny, “but it is because you're his friends, not because of that knife" (Ch. 9).
Later, when Johnny dies, it is with one final message to Ponyboy, to “stay gold.” He wants to let him know that he needs to make something of his life. Johnny feels guilty about what happened at the church still. Pony was there because of him. He wants to die with his conscience clear, knowing that Pony will go on to be more than a greaser.
Having visitors may have weakened Johnny, but they were also the only family they had. It was important for them to be there at the end, to show that they cared and allow him to pass on his dying message to Pony.