Labour MPs have criticised George Osborne after he likened a gay shadow minister to a "pantomime dame".
The comment came after Chris Bryant accused the chancellor of delighting in playing "Baron Hardup" and suggested he "play Prince Charming instead".
Writing on the micro-blogging site Twitter, Mr Bryant said the response was either "homophobic or just nasty".
Mr Osborne's aides said it was just a "Christmas joke" in the pantomime theme begun by Mr Bryant - not homophobic.
The exchange came in the Commons chamber on Tuesday, in the last Treasury questions before Christmas.
'Got it wrong'
Mr Bryant, Labour MP for the Rhondda and a shadow justice minister, said: "The chancellor of the exchequer takes a particular delight, it seems, in playing the role of Baron Hardup.
"But can I just say to him in the nicest, Christmassy way possible, that all his austerity talk does provide real anxiety for many of my constituents who worry about their winter fuel allowance, who worry about VAT increasing in January, who worry about major losses in construction jobs in the new year.
"So can I please just encourage him, just sometimes, to play Prince Charming instead?"
Mr Osborne instantly quipped "at least I'm not the pantomime dame" - to protests from Labour MPs - before going on to say the government was dealing with the "economic inheritance that the previous government, of which he was a minister, left this country".
Mr Bryant wrote on Twitter later: "So George Osborne clearly doesn't know how to be charming with his jibe at me as a pantomime dame. Homophobic or just nasty?"
Fellow Labour MP Kerry McCarthy wrote on Twitter that it was a "nasty little homophobic jibe from Osborne".
Mr Bryant said later: "I don't think he would have said that phrase if I was not gay. I think when he gets back to the office he will probably think to himself 'I should send a little note saying sorry, I didn't mean to offend'. We all get it wrong sometimes and I think he got it wrong this time."
Deputy Prime Minister Nick Clegg and Prime Minister David Cameron were asked about the exchange at a joint press conference on Tuesday afternoon but both said they had not seen it.
Mr Clegg said: "Surely it wasn't intended as a homophobic remark - of course not."
He added: "I've been in a pantomime myself."