Swansea boss Brendan Rodgers will now be reunited with Graham, as the pair worked together when Rodgers was manager at Vicarage Road.
Chairman Huw Jenkins said: "Danny... is thrilled to conclude the deal and is looking forward to the challenge of Premier League football with Swansea.
"He is a player we have admired for quite some time and as a football club we are delighted to get our man.
"Brendan is looking forward to working with him and there is no doubt he will strengthen our team for the new campaign.''
The Liberty Stadium club increased their initial £3m offer to £3.5m and Watford accepted the bid.
Graham, who had one year remaining on his Watford contract, had attracted attention from several clubs including QPR and Norwich City, who were also promoted from the Championship and into the Premier League this season.
West Bromwich Albion and Newcastle United were also reportedly interested in Graham, but Swansea, who had a bid for the 6ft 1in frontman rejected at the start of last season, were the front-runners to sign him.
Swansea were aware of Graham's eye for goal as he scored in Watford's 1-1 draw at the Liberty Stadium in March - one of his 27 goals in all competitions.
Rodgers is keen to strengthen his strike force, with on-loan Chelsea striker Fabio Borini set to turn down the chance of joining Swansea permanently to
sign a five-year deal at Parma
in his Italian homeland.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.