The density assumption  on U implies U is Stein .Such pairs (U,X) are called
Runge pairs. The homology version of your statement is proved in the paper of
Andreotti and Narasimhan Annals of Math vol 76 no 3 (1962) 499-509 using Morse 
Theory.The title of the paper is "A Topological property of Runge pairs"