The kitten is a feral. He's lived outside for who knows how long. He's learning to live inside and trust. He was happy having you with him - and then when things changed - he got confused again.
He was showing you that he was frustrated. Once he is altered and his hormones change, he will begin to mellow more and more.
I have two feral kittens. Apache was the first to leave her family, and I was able to catch her at 4 1/2 months. Her brother Amigo avoided capture too many times to want to remember. I finally caught him at 7 months old. Apache was a hisser and petrified. But she was food motivated. She ended up being easy to tame. She's now my little cuddle cat.
Amigo is still timid - but getting confident every day. His sister is teaching him to play and to trust. He will still cowar at times with us - and we can't always pick him up.
Depending on your dogs, they may be able to be friends. My dogs love cats, and they play with the kittens.
Best of Luck!!!!
Dallas, Houston & Peanut the Prairie Dogs
Gypsy & Amber the Satos
Apache, Amigo, Max, and Morgan the Kitties
Scooter, Annie, Buttercup & Squeaky the Guinea Pigs
Mocha & Latte the Rat A Tats