The book doesn't suggest that Harry has complete control over the snake. The quote from the encounter with Justin Finch-Fletchley states:
He brandished his wand at the snake and there was a loud bang; the snake, instead of vanishing, flew ten feet into the air and fell back to the floor with a loud smack. Enraged, hissing furiously, it slithered straight toward Justin Finch-Fletchley and raised itself again, fangs exposed, poised to strike.
Harry wasn't sure what made him do it. He wasn't even aware of deciding to do it. All he knew was that his legs were carrying him forward as though he was on casters and that he had shouted stupidly at the snake, "Leave him alone!" And miraculously - inexplicably - the snake slumped to the floor, docile as a thick, black garden hose, its eyes now on Harry. Harry felt the fear drain out of him. He knew the snake wouldn't attack anyone now, though how he knew it, he couldn't have explained.
The snake was ready to attack and Harry shouted at it to stop. I would equate this to using a firm voice with a dog. Even if you are not that dog's owner and it is not familiar with you; generally, if you use a firm voice the dog will obey. It helps too that the snake already "understands" the language that is being spoken.
The relationship with Voldemort and Nagini is slightly different as mentioned by Dumbledore in Half Blood Prince (emphasis mine):
I think he is perhaps as fond of her as he can be of anything. He certainly likes to keep her close and has an unusual amount of control over her, even for a Parselmouth.
It seems clear that even Dumbledore thinks the level of control Voldemort has over Nagini is unusual. Presumably, because Nagini contains a part of his soul, Voldemort has stronger "control" over her. It is also likely that Voldemort has been in the company of Nagini for some time (and possibly has possessed Nagini in the past), which would have strengthened the bond between them.
Finally, the Basilisk was said to be bred to obey only the heir of Slytherin. According to the legend described by Professor Binns in CoS:
“That is believed to be some sort of monster, which the Heir of Slytherin alone can control,” said Professor Binns in his dry, reedy voice.