Was the Irish backstop asked for by the UK Government or was it was it an imposition by the EU?
It was a bit of both.
The EU insisted, from the earliest hours, on avoiding a hard border between Ireland and Northern Ireland. Moreover, its position at the time was that under no circumstances should the whole of the UK be subjected to the same.
There were a few back and forth conversations that eventually led to the joint declaration in December 2017 to that effect. The commentary at the time from observers on both sides of the Channel was that this meant Northern Ireland would remain aligned with the EU for all practical intents, and I'd wager as an opinion that this registered on the UK government's end too but for political posturing reasons they didn't shout it right left and center.
At any rate, when the EU published its draft legislation on what this meant the UK government finally took a public position and said that it was unacceptable. The DUP, of course, would have none of it either -- on the basis that this would put the Union in jeopardy.
From that point onward, from the public viewpoint at least (many points were agreed upon in the background while the political theatrics were in full swing), the negotiation revolved around the Irish backstop and ways to work around it or avoid it.
To May's credit, the EU eventually dropped its redline and agreed that the whole of the UK could be subjected to the Irish backstop legalese, rather than just Northern Ireland. Just to be clear here, this was a major concession and May deserves credit for getting it. As an outside observer, I sincerely hope that history books will be kind to her in the sense that she was stuck between a rock and a hard place, and she basically achieved the impossible by getting that concession in Nov 2018.
The result of that concession was a backstop that applied to the UK as a whole, which is what your question is about. So... no, the Irish backstop wasn't the UK's idea... but it kind of was in that it agreed with it in principle... and then definitely yes, in that it insisted that the backstop apply to the UK as a whole.
In its current form the proposal for the backstop came from the UK. Irish Border BBC. The EU's proposal was to keep NI within the customs union until all future trade negotiation was resolved, regardless of the situation with the rest of the UK.
This was unacceptable as it threatened the UKs territorial integrity and internal cohesion. So Theresa May responded with her own proposal.
She suggested a backstop that would see the UK, as a whole, remaining aligned with the EU customs union for a limited time after 2020.
Joint negotiation extend this to the current backstop of the UK remaining in the Custom Union etc.