Sir James Munby, President of the Family Division, ruled that not allowing single men or women to be surrogate parents contravenes their right to a family life enshrined in the European Convention of Human Rights.
He was ruling in the case of a single man who cannot be named for the protection of his son.
The man used a donor egg and his own sperm to father the boy, using a surrogate mother in America who was paid £30,000.
His attempts to become the boy's legal parent was previously rejected, however that decision was effectively overturned by Sir Munby on Friday.
Frank Field, a Christian and Labour MP for Birkenhead, told the Mail on Sunday: "In all these decisions, the natural rights of the child get overlooked.
"Parenting is a huge job and it's about time that children are put centre stage, not selfish adults."
And Rob Flello, the Labour MP for Stoke-on-Trent South and a Christian, told the paper: "It's a tragedy the rights of the child are not first and foremost - the right of a child to have a family around them."
The parent of the child said in a statement: "I am delighted by today's ruling which finally confirms that the law is discriminatory against both my family and others in the same situation."