Smokers caught sparking up at hospitals, playgrounds or on school sites in Wales now face a £100 fine.
It is also now illegal to smoke in outdoor areas of day-care and child-minding settings in Wales.
Minister Eluned Morgan said it was a "proud day" after the Welsh Government became the first UK administration to implement such a ban.
However smokers' rights campaigners have accused the government of trying to "micro-manage people's lives".
It is the first major set of curbs on smoking to be introduced since smoking in cars with children was banned in England and Wales in 2015.
Smoking in enclosed public spaces was banned in Wales in 2007.
The Welsh Government said it hoped the ban would help protect people's health by discouraging adults and children from starting smoking and supporting those who are trying to quit.
In addition to fines, a speaker system which allows people to press a button and remind smokers they are breaking the law has been installed at the Grange Hospital in Cwmbran and the Royal Gwent Hospital in Newport.
Enforcement officers employed by Aneurin Bevan health board will also patrol hospital grounds.
Minister for Mental Health and Well-being Baroness Morgan said the Welsh Government was "immensely proud".
"We've seen the impact of the indoor smoking ban and we hope this will be similarly successful," she said.
"This legislation will benefit the health of future generations in Wales, as fewer children will be exposed to smoking and, we hope, fewer will take it up themselves.
"We need to do everything we can to combat the harmful effects of smoking."
Suzanne Cass, of anti-smoking group Ash Wales, said: "We are very proud that Wales is leading the way with this forward-thinking legislation.
"For too long smoking has been perceived as a normal lifestyle choice with smokers being able to light up in places where our children play, socialise and learn.
"There is nothing normal about smoking, however. It is an extremely harmful addiction that all too often begins in childhood.
"We hope that this legislation will make great strides in changing perceptions about this addiction and prevent children from becoming the next generation of adult smokers."
But the industry-funded Freedom Organisation for the Right to Enjoy Smoking Tobacco (Forest) has labelled the law "unnecessary and wrong" and like "taking a sledgehammer to crack a nut".
Director Simon Clark said there was no evidence to suggest the law would achieve what the Welsh Government wants it to.
Banning smoking at hospitals was "particularly unjust", Mr Clark said, because it targets smokers who may be "stressed and in need of a comforting cigarette".
He added: "Most smokers use their common sense and don't smoke around small children. They don't need politicians telling them how to behave."
About 33,000 people in Wales have stopped smoking since the coronavirus pandemic began, a survey by charity Action on Smoking and Health suggests.