Isabella Lovin, who is also the country’s climate minister, published a photo that shows her signing a new law surrounded by female colleagues.
The image has drawn comparisons with Mr Trump’s photo in which no women were present.
Within hours the post was shared and liked thousands of times on Facebook.
“Wonderful Picture! Hope you sent it to the man on the other side of the ocean,” writes one user.
“Make the Planet Great Again!” writes another.
Facebook user Kimini Delfos said in a post that such an image should not spark the reaction that it has, suggesting that people “calm down”.
“Why is it so difficult to see a picture with just women and not difficult to see a picture with only men?” she questioned.
Meanwhile, users of the social media site Twitter have praised what is being described as Ms Lovin’s “dig” at the US president.
“Love how the Swedish Deputy PM is taking a dig at Donald Trump in her publicity photo for passing climate change law,” writes user Ian Sinkins.
Another, Mikaela Hildebrand, writes: “@IsabellaLovin signs new the Swedish climate law & issues funniest #Trumbburn foto! Epic!”
The comparisons are being made to a photo last month of Mr Trump signing an executive order to ban federal money going to international groups which perform or provide information on abortions.
The image of Mr Trump signing the document surrounded by male colleagues was ridiculed on social media.
On Friday, while signing Sweden’s new climate law, Ms Lovin urged European countries to take a leading role in tackling climate change as “the US is not there anymore to lead”.
The new law sets long-term goals for greenhouse gas reductions and will be legally binding for future administrations.
Ms Lovin said Sweden wanted to set an example at a time when “climate sceptics [are] really gaining power in the world again”.
Mr Trump, who has previously called climate change a hoax, has raised speculation that he might pull the US out of the Paris Agreement, which aims to tackle greenhouse gas emissions and limit the increase in global temperatures.
The Swedish government, which claims to be “the first feminist government in the world”, has also issued a statement affirming that gender equality is “central” to its priorities.
“Gender equality is also part of the solution to society’s challenges and a matter of course in a modern welfare state – for justice and economic development,” the statement reads.