Weir nudged the hosts into an early lead but the Dragons hit back for a superb try to take the lead with Matthew Jones and Mike Poole combining to put Martyn Thomas away.
Weir and Jones exchanged a series of penalties and the Men of Gwent went into the interval with a 16-12 lead.
Weir reduced the deficit to a point with another penalty on 44 minutes. The hosts thought they had grabbed a crucial try mid-way through the second-half but Colin Shaw’s effort was ruled out.
The home fly-half continued his virtuoso performance with the boot with two more penalties before Jason Tovey responded with a penalty of his own.
The Dragons threw everything but the sink at the Warriors in the closing stages and pushed for a late try but the Scottish club clung on for a hard-fought victory.
Â