Shona Campbell criticised the mum for laughing along with her son after they pointed out the heart-shaped pattern.
Campbell said she was proud of her son Harry, who makes his own decisions about who he wants to be and what he wants to wear.
"You may have thought I didn't hear you but let me assure you I did when your child pointed out my son had love hearts on his socks," Campbell began the letter on Facebook.
"When your child pointed out my son had love hearts on his socks, and mocked them for being girls' socks, you absolutely tore apart my faith in this world, because you agreed and laughed along with your child," Campbell wrote.
"My son is three years old, he loves love hearts, he loves the colour pink, he loves to play with dolls and prams.
"But what he loves more than anything is having the independence to make his own choices. He chose these socks in the shop and he chose to wear them today."
Campbell openly asked why adults shouldn't teach children that there are certain colours, toys or clothes for girls and boys.
"If my son wants to wear a dress, he can. If he wants to wear a big fluffy hat, he can," she continued.
"And if he wants to wear socks with love hearts, he can.
"I am bringing up my son to be whoever he wants to be and I do not appreciate people like you poking fun at him, telling him he's wrong for what he wears or dictating what he should or shouldn't do or wear."
She said her son is the "perfect age" to allow children to make their own decisions and let them figure out who they want to be, not who society says they should be.
Alongside the photo of her son wearing the heart-printed socks, Campbell added: "This is my son. And I love him. Love heart socks and all.
"I'd really like to make sure she, and anyone else that thinks it's ok to specify gender in clothes, sees this and hopes narrow mindedness is replaced with open mindedness."
Campbell wrote the post on Facebook on 24 March 2016 and was shared 95,000 times in five days.
She said she didn’t say anything to the mother at the time because she didn't want to cause a scene.
"By the time I had taken Harry home the words I wanted to say were so much clearer, so I took to Facebook to share my feelings," she told BuzzFeed News.
"I believe that actually we should be learning from them, who they want to be, and guide them along their way."
Commenting on the post, many parents agreed children should not be confined into certain categories for the clothes they wear.
"The world would be a much more interesting place if people just wore what they liked," one woman commented.
"Some people are just sheltered and not intelligent enough to notice things for what they are."
Another person wrote: "Society has shaped us to believe what is right for boys and girls. It sucks.
"We need to all just let our kids be, and find themselves, not fit into a box that someone made up."