Both confront a news media that has swung from fawning to churlish. So maddened are their opponents that they forget what they once stood for.
Gillard can't garner support for a refugee bill that lawmakers probably would have supported before June last year, when she came to power. Opposition leader Tony Abbott now opposes an emissions-trading system his party backed a few years ago.
In the US, Republicans are down on Obama's plan to cut payroll taxes, something they would have supported in an instant in the past. In both cases, the opposition would rather hand leaders political defeats than stay true to their convictions.
What's more, both Obama and Gillard were, to varying degrees, dealt bad hands of cards.
Australia's economy steered around the worst of the 2008 financial crisis, its national budget isn't far from balance and exporters have a reliable customer in China.
One might argue that Gillard's predicament is partly of her own making as the ousting of predecessor Kevin Rudd in a political coup fuelled public discontent.
Yet Gillard inherited a long to-do list because Rudd (2007 to 2010) and John Howard (1996 to 2007) had largely left the economy on autopilot.
Most of the heavy lifting was done by past prime ministers such as Bob Hawke (1983 to 1991) and Paul Keating (1991 to 1996). Howard and Rudd opted to coast and ride China's boom. Gillard doesn't have that luxury as the world economy slides anew.
Obama faces a far more intractable set of obstacles. A variety of crises came to a head as he entered the White House in 2009. Yet Republicans have taken an over-our-dead-body position against Obama's every effort.
The only answer for Gillard and Obama is to get radical - be bold, think big and fight for your ideals. Neither leader seems set to do that.
Much the same can be said of the rest of the world, not to mention Asia.
Japan's growing list of premiers since 2000 is a who's who of weak leaders. From India to Malaysia to South Korea, Asians are struggling amid tepid stewardship. Those with vision and backbone, Susilo Bambang Yudhoyono of Indonesia and Benigno Aquino of the Philippines, are up against institutionalised corruption fighting their every move.
Europe too is a mess. Germany's Chancellor Angela Merkel personifies the long list of leaders needing opposition support just to stay in power. As Greece burns and euro-area credit ratings get slashed, leaders are looking to a developing nation for help, China.
The G-20 leaders are not coming up with innovative ideas. In a more perfect world, Australia would be doing just that. It boasts the kinds of statistics officials in Brussels, Tokyo and Washington would kill for.
While the Federal Reserve and Bank of Japan hold interest rates at zero, Australia's central bank has set overnight rates at 4.75 per cent. That gives it plenty of monetary ammunition.
Australia is also on the front lines of globalisation's biggest challenges: the effects of climate change, an ageing population, immigration, a widening gap between rich and poor, creaky infrastructure and an education system that needs an overhaul to maintain competitiveness.
On these and other issues, ones shared by Obama, Australia's voice should be sought early and often.
Yes, Gillard and Obama will have much to discuss come November. That is, if she's even in office.
Canberra is abuzz with talk that the Labor Party will soon dump Gillard and go with Rudd once again.
Stranger things have happened, as Gillard's peer in Washington can tell you all about, too.
- Bloomberg